X-Git-Url: http://git.code-monkey.de/?p=pulseview.git;a=blobdiff_plain;f=pv%2Fglobalsettings.cpp;h=19ce0cd79104cce58878f1ee194fd4ac452f1736;hp=1cd6566530590f2d5d52ba14c0d06fe9ccf39f72;hb=97378470ded88af84edaa0f1063d10d834475665;hpb=a42d2514a57051f971e7b239bc3765ebf93669ae diff --git a/pv/globalsettings.cpp b/pv/globalsettings.cpp index 1cd6566..19ce0cd 100644 --- a/pv/globalsettings.cpp +++ b/pv/globalsettings.cpp @@ -44,6 +44,7 @@ const vector< pair > Themes { const QString GlobalSettings::Key_General_Theme = "General_Theme"; const QString GlobalSettings::Key_General_Style = "General_Style"; +const QString GlobalSettings::Key_General_SaveWithSetup = "General_SaveWithSetup"; const QString GlobalSettings::Key_View_ZoomToFitDuringAcq = "View_ZoomToFitDuringAcq"; const QString GlobalSettings::Key_View_ZoomToFitAfterAcq = "View_ZoomToFitAfterAcq"; const QString GlobalSettings::Key_View_TriggerIsZeroTime = "View_TriggerIsZeroTime"; @@ -58,6 +59,7 @@ const QString GlobalSettings::Key_View_DefaultDivHeight = "View_DefaultDivHeight const QString GlobalSettings::Key_View_DefaultLogicHeight = "View_DefaultLogicHeight"; const QString GlobalSettings::Key_View_ShowHoverMarker = "View_ShowHoverMarker"; const QString GlobalSettings::Key_View_SnapDistance = "View_SnapDistance"; +const QString GlobalSettings::Key_View_CursorFillColor = "View_CursorFillColor"; const QString GlobalSettings::Key_Dec_InitialStateConfigurable = "Dec_InitialStateConfigurable"; const QString GlobalSettings::Key_Dec_ExportFormat = "Dec_ExportFormat"; const QString GlobalSettings::Key_Log_BufferSize = "Log_BufferSize"; @@ -93,6 +95,10 @@ void GlobalSettings::set_defaults_where_needed() if (!contains(Key_General_Style)) setValue(Key_General_Style, ""); + // Save setup with .sr files by default + if (!contains(Key_General_SaveWithSetup)) + setValue(Key_General_SaveWithSetup, true); + // Enable zoom-to-fit after acquisition by default if (!contains(Key_View_ZoomToFitAfterAcq)) setValue(Key_View_ZoomToFitAfterAcq, true); @@ -134,20 +140,27 @@ void GlobalSettings::set_defaults_where_needed() if (!contains(Key_Log_NotifyOfStacktrace)) setValue(Key_Log_NotifyOfStacktrace, true); - // Default theme is bright, so use its color scheme - set_bright_theme_default_colors(); + // Default theme is bright, so use its color scheme if undefined + if (!contains(Key_View_CursorFillColor)) + set_bright_theme_default_colors(); } void GlobalSettings::set_bright_theme_default_colors() { setValue(Key_View_FillSignalHighAreaColor, QColor(0, 0, 0, 5 * 256 / 100).rgba()); + + setValue(Key_View_CursorFillColor, + QColor(220, 231, 243).rgba()); } void GlobalSettings::set_dark_theme_default_colors() { setValue(Key_View_FillSignalHighAreaColor, QColor(188, 188, 188, 9 * 256 / 100).rgba()); + + setValue(Key_View_CursorFillColor, + QColor(60, 60, 60).rgba()); } bool GlobalSettings::current_theme_is_dark()