diff options
| author | Carl Hetherington <cth@carlh.net> | 2024-11-23 23:53:12 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2025-09-28 19:49:26 +0200 |
| commit | f3275bba73347eef03bbe6f7982e8ca25f2aced6 (patch) | |
| tree | 872667cdb63a4e3372b5cd5235d82c5b868fac3b /src/lib/config.h | |
| parent | eda4ed548e51ab1c231205ec141dac3dd6be2ac4 (diff) | |
Save window metrics in the config file (#1575).
Perhaps these should be in a separate GUI file, like how it's done for
Films, but I can't really see a big advantage (and there already
GUI-only details in there).
In this commit we also save the hints dialog size/position and
start it a bit larger (#2892).
Diffstat (limited to 'src/lib/config.h')
| -rw-r--r-- | src/lib/config.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/lib/config.h b/src/lib/config.h index d8ff70db8..88f8eda1a 100644 --- a/src/lib/config.h +++ b/src/lib/config.h @@ -39,6 +39,7 @@ #include <dcp/language_tag.h> #include <boost/signals2.hpp> #include <boost/filesystem.hpp> +#include <unordered_map> #include <vector> @@ -697,6 +698,8 @@ public: return _layout_for_short_screen; } + boost::optional<std::pair<Position<int>, dcp::Size>> window_metrics(std::string name) const; + /* SET (mostly) */ void set_master_encoding_threads(int n) { @@ -1273,6 +1276,7 @@ public: maybe_set(_layout_for_short_screen, layout); } + void set_window_metrics(std::string name, Position<int> position, dcp::Size size); void changed(Property p = OTHER); boost::signals2::signal<void (Property)> Changed; @@ -1529,6 +1533,8 @@ private: ExportConfig _export; + std::unordered_map<std::string, std::pair<Position<int>, dcp::Size>> _window_metrics; + static int const _current_version; /** Singleton instance, or 0 */ |
