diff --git a/rtdata/languages/Francais b/rtdata/languages/Francais index d423d946f..bf5d9e4d8 100644 --- a/rtdata/languages/Francais +++ b/rtdata/languages/Francais @@ -990,7 +990,6 @@ PREFERENCES_REMEMBERZOOMPAN;Se souvenir de niveau de zoom et de la position de l PREFERENCES_REMEMBERZOOMPAN_TOOLTIP;Retient le niveau de zoom et la position de l'image courante lors de l'ouverture d'une nouvelle image.\n\nCette option ne fonctionne que dans le mode "Éditeur unique" et quand "Méthode de dématriçage utilisé pour l'aperçu à un zoom <100%" is set to "Idem PP3". PREFERENCES_RGBDTL_LABEL;Nombre maximum d'unités de calcul pour la Réduction du bruit PREFERENCES_RGBDTL_TOOLTIP;La réduction du bruit nécessite un minimum d'à peu près 128Mo de RAM pour une image de 10MPix ou 512Mo pour une image de 40MPix, ainsi que 128Mo de RAM supplémentaire par unité de calcul. Plus il y aura d'unités de calcul travaillant en parallèle, plus ce sera rapide. Laissez la valeur à "0" pour utiliser automatiquement autant d'unités de calcul que possible. -PREFERENCES_SELECTFONT;Police générale PREFERENCES_SELECTFONT_COLPICKER;Police des pipette à couleur PREFERENCES_SELECTLANG;Choix de la langue PREFERENCES_SELECTTHEME;Choisissez un thème diff --git a/rtdata/languages/default b/rtdata/languages/default index c118eefe4..48bd3b1b0 100644 --- a/rtdata/languages/default +++ b/rtdata/languages/default @@ -1041,7 +1041,6 @@ PREFERENCES_REMEMBERZOOMPAN;Remember zoom % and pan offset PREFERENCES_REMEMBERZOOMPAN_TOOLTIP;Remember the zoom % and pan offset of the current image when opening a new image.\n\nThis option only works in "Single Editor Tab Mode" and when "Demosaicing method used for the preview at <100% zoom" is set to "As in PP3". PREFERENCES_RGBDTL_LABEL;Max number of threads for Noise Reduction and Wavelet Levels PREFERENCES_RGBDTL_TOOLTIP;Leave the setting at "0" to automatically use as many threads as possible. The more threads run in parallel, the faster the computation. Refer to RawPedia for memory requirements. -PREFERENCES_SELECTFONT;Select global font PREFERENCES_SELECTFONT_COLPICKER;Select Color Picker's font PREFERENCES_SELECTLANG;Select language PREFERENCES_SELECTTHEME;Select theme diff --git a/rtgui/main.cc b/rtgui/main.cc index bfeafe7bf..1933939f8 100644 --- a/rtgui/main.cc +++ b/rtgui/main.cc @@ -307,7 +307,7 @@ int main(int argc, char **argv) Glib::RefPtr screen = Gdk::Screen::get_default(); - if (!options.useSystemTheme && screen) { + if (screen) { Gtk::Settings::get_for_screen(screen)->property_gtk_theme_name() = "Adwaita"; Gtk::Settings::get_for_screen(screen)->property_gtk_application_prefer_dark_theme() = true; diff --git a/rtgui/options.cc b/rtgui/options.cc index 858a56953..b1942012d 100644 --- a/rtgui/options.cc +++ b/rtgui/options.cc @@ -373,7 +373,6 @@ void Options::setDefaults () lastSaveAsPath = ""; overwriteOutputFile = false; // if TRUE, existing output JPGs/PNGs are overwritten, instead of adding ..-1.jpg, -2.jpg etc. theme = "RawTherapee"; - useSystemTheme = false; maxThumbnailHeight = 250; maxCacheEntries = 20000; thumbInterp = 1; @@ -791,10 +790,6 @@ int Options::readFromFile (Glib::ustring fname) theme = keyFile.get_string ("General", "Theme"); } - if (keyFile.has_key ("General", "UseSystemTheme")) { - useSystemTheme = keyFile.get_boolean ("General", "UseSystemTheme"); - } - if ( keyFile.has_key ("General", "DarkFramesPath")) { rtSettings.darkFramesPath = keyFile.get_string ("General", "DarkFramesPath"); } @@ -1836,7 +1831,6 @@ int Options::saveToFile (Glib::ustring fname) keyFile.set_string ("General", "Language", language); keyFile.set_boolean ("General", "LanguageAutoDetect", languageAutoDetect); keyFile.set_string ("General", "Theme", theme); - keyFile.set_boolean ("General", "UseSystemTheme", useSystemTheme); keyFile.set_string ("General", "Version", VERSION); keyFile.set_string ("General", "DarkFramesPath", rtSettings.darkFramesPath); keyFile.set_string ("General", "FlatFieldsPath", rtSettings.flatFieldsPath); diff --git a/rtgui/options.h b/rtgui/options.h index 6009d4b39..ff29b789d 100644 --- a/rtgui/options.h +++ b/rtgui/options.h @@ -160,7 +160,6 @@ public: Glib::ustring language; bool languageAutoDetect; Glib::ustring theme; - bool useSystemTheme; static Glib::ustring cacheBaseDir; bool autoSuffix; bool forceFormatOpts; diff --git a/rtgui/preferences.cc b/rtgui/preferences.cc index ada41504b..2be4cecd3 100644 --- a/rtgui/preferences.cc +++ b/rtgui/preferences.cc @@ -824,9 +824,9 @@ Gtk::Widget* Preferences::getGeneralPanel () workflowGrid->attach_next_to(*ckbHistogramWorking, *curveBBoxPosC, Gtk::POS_BOTTOM, 2, 1); ckbFileBrowserToolbarSingleRow = Gtk::manage( new Gtk::CheckButton (M("PREFERENCES_FILEBROWSERTOOLBARSINGLEROW")) ); - setExpandAlignProperties(ckbFileBrowserToolbarSingleRow, false, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE); + setExpandAlignProperties(ckbFileBrowserToolbarSingleRow, false, false, Gtk::ALIGN_START, Gtk::ALIGN_START); ckbShowFilmStripToolBar = Gtk::manage( new Gtk::CheckButton (M("PREFERENCES_SHOWFILMSTRIPTOOLBAR")) ); - setExpandAlignProperties(ckbShowFilmStripToolBar, false, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE); + setExpandAlignProperties(ckbShowFilmStripToolBar, false, false, Gtk::ALIGN_START, Gtk::ALIGN_START); workflowGrid->attach_next_to(*ckbFileBrowserToolbarSingleRow, *ckbHistogramPositionLeft, Gtk::POS_BOTTOM, 1, 1); workflowGrid->attach_next_to(*ckbShowFilmStripToolBar, *ckbHistogramWorking, Gtk::POS_BOTTOM, 2, 1); @@ -858,7 +858,7 @@ Gtk::Widget* Preferences::getGeneralPanel () Gtk::Label* langlab = Gtk::manage( new Gtk::Label (M("PREFERENCES_SELECTLANG") + ":") ); setExpandAlignProperties(langlab, false, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE); languages = Gtk::manage( new Gtk::ComboBoxText () ); - setExpandAlignProperties(languages, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_BASELINE); + setExpandAlignProperties(languages, false, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE); std::vector langs; parseDir (argv0 + "/languages", langs, ""); @@ -871,8 +871,8 @@ Gtk::Widget* Preferences::getGeneralPanel () Gtk::Label* langw = Gtk::manage( new Gtk::Label (Glib::ustring(" (") + M("PREFERENCES_APPLNEXTSTARTUP") + ")") ); setExpandAlignProperties(langw, false, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE); - langGrid->attach_next_to(*ckbLangAutoDetect, Gtk::POS_LEFT, 1, 1); - langGrid->attach_next_to(*langlab, *ckbLangAutoDetect, Gtk::POS_RIGHT, 1, 1); + langGrid->attach_next_to(*ckbLangAutoDetect, Gtk::POS_LEFT, 3, 1); + langGrid->attach_next_to(*langlab, *ckbLangAutoDetect, Gtk::POS_BOTTOM, 1, 1); langGrid->attach_next_to(*languages, *langlab, Gtk::POS_RIGHT, 1, 1); langGrid->attach_next_to(*langw, *languages, Gtk::POS_RIGHT, 1, 1); flang->add (*langGrid); @@ -887,14 +887,10 @@ Gtk::Widget* Preferences::getGeneralPanel () themeGrid->set_row_spacing(4); setExpandAlignProperties(themeGrid, false, false, Gtk::ALIGN_FILL, Gtk::ALIGN_FILL); - chUseSystemTheme = Gtk::manage( new Gtk::CheckButton (M("PREFERENCES_USESYSTEMTHEME")+" ("+ M("PREFERENCES_APPLNEXTSTARTUP") + ")") ); - setExpandAlignProperties(chUseSystemTheme, false, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE); - themeGrid->attach_next_to(*chUseSystemTheme, Gtk::POS_LEFT, 2, 1); - Gtk::Label* themelab = Gtk::manage( new Gtk::Label (M("PREFERENCES_SELECTTHEME") + ":") ); setExpandAlignProperties(themelab, false, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE); theme = Gtk::manage( new Gtk::ComboBoxText () ); - setExpandAlignProperties(theme, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_BASELINE); + setExpandAlignProperties(theme, false, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE); theme->set_active (0); std::vector themes; @@ -904,37 +900,24 @@ Gtk::Widget* Preferences::getGeneralPanel () theme->append (themes[i]); } - Gtk::Label* fontlab = Gtk::manage( new Gtk::Label (M("PREFERENCES_SELECTFONT") + ":") ); - setExpandAlignProperties(fontlab, false, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE); - - themeGrid->attach_next_to(*themelab, *chUseSystemTheme, Gtk::POS_BOTTOM, 1, 1); + themeGrid->attach_next_to(*themelab, Gtk::POS_LEFT, 1, 1); themeGrid->attach_next_to(*theme, *themelab, Gtk::POS_RIGHT, 1, 1); - themeGrid->attach_next_to(*fontlab, *theme, Gtk::POS_RIGHT, 1, 1); - Gtk::Grid* cropcolorGrid = Gtk::manage( new Gtk::Grid () ); - cropcolorGrid->set_column_spacing(4); - cropcolorGrid->set_row_spacing(4); Gtk::Label* cutOverlayLabel = Gtk::manage( new Gtk::Label (M("PREFERENCES_CUTOVERLAYBRUSH") + ":") ); setExpandAlignProperties(cutOverlayLabel, false, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE); butCropCol = Gtk::manage( new Gtk::ColorButton() ); setExpandAlignProperties(butCropCol, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); butCropCol->set_use_alpha(true); - cropcolorGrid->attach_next_to(*cutOverlayLabel, Gtk::POS_LEFT, 1, 1); - cropcolorGrid->attach_next_to(*butCropCol, *cutOverlayLabel, Gtk::POS_RIGHT, 1, 1); + themeGrid->attach_next_to(*cutOverlayLabel, *themelab, Gtk::POS_BOTTOM, 1, 1); + themeGrid->attach_next_to(*butCropCol, *cutOverlayLabel, Gtk::POS_RIGHT, 1, 1); - Gtk::Grid* navguidecolGrid = Gtk::manage( new Gtk::Grid () ); - navguidecolGrid->set_column_spacing(4); - navguidecolGrid->set_row_spacing(4); Gtk::Label* navGuideLabel = Gtk::manage( new Gtk::Label (M("PREFERENCES_NAVGUIDEBRUSH") + ":") ); setExpandAlignProperties(navGuideLabel, false, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE); butNavGuideCol = Gtk::manage( new Gtk::ColorButton() ); setExpandAlignProperties(butNavGuideCol, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); butNavGuideCol->set_use_alpha(true); - navguidecolGrid->attach_next_to(*navGuideLabel, Gtk::POS_LEFT, 1, 1); - navguidecolGrid->attach_next_to(*butNavGuideCol, *navGuideLabel, Gtk::POS_RIGHT, 1, 1); - - themeGrid->attach_next_to(*cropcolorGrid, *themelab, Gtk::POS_BOTTOM, 2, 1); - themeGrid->attach_next_to(*navguidecolGrid, *cropcolorGrid, Gtk::POS_RIGHT, 2, 1); + themeGrid->attach_next_to(*navGuideLabel, *butCropCol, Gtk::POS_RIGHT, 1, 1); + themeGrid->attach_next_to(*butNavGuideCol, *navGuideLabel, Gtk::POS_RIGHT, 1, 1); ftheme->add (*themeGrid); mvbsd->attach_next_to(*ftheme, *flang, Gtk::POS_BOTTOM, 2, 1); @@ -979,12 +962,12 @@ Gtk::Widget* Preferences::getGeneralPanel () Gtk::Grid* navigationGrid = Gtk::manage( new Gtk::Grid() ); navigationGrid->set_column_spacing(4); navigationGrid->set_row_spacing(4); - setExpandAlignProperties(fclip, false, false, Gtk::ALIGN_FILL, Gtk::ALIGN_FILL); + setExpandAlignProperties(fclip, false, false, Gtk::ALIGN_START, Gtk::ALIGN_FILL); Gtk::Label* panFactorLabel = Gtk::manage( new Gtk::Label (M("PREFERENCES_PANFACTORLABEL") + ":", Gtk::ALIGN_START)); - setExpandAlignProperties(panFactorLabel, true, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE); + setExpandAlignProperties(panFactorLabel, false, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE); panFactor = Gtk::manage( new Gtk::SpinButton () ); - setExpandAlignProperties(panFactor, false, false, Gtk::ALIGN_END, Gtk::ALIGN_BASELINE); + setExpandAlignProperties(panFactor, true, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE); panFactor->set_digits (0); panFactor->set_increments (1, 5); panFactor->set_range (1, 10); @@ -1065,7 +1048,6 @@ Gtk::Widget* Preferences::getGeneralPanel () langAutoDetectConn = ckbLangAutoDetect->signal_toggled().connect (sigc::mem_fun(*this, &Preferences::langAutoDetectToggled)); tconn = theme->signal_changed().connect( sigc::mem_fun(*this, &Preferences::themeChanged) ); - usethcon = chUseSystemTheme->signal_clicked ().connect( sigc::mem_fun(*this, &Preferences::useThemeChanged) ); return mvbsd; } @@ -1388,7 +1370,6 @@ void Preferences::storePreferences () moptions.language = languages->get_active_text (); moptions.languageAutoDetect = ckbLangAutoDetect->get_active (); moptions.theme = theme->get_active_text (); - moptions.useSystemTheme = chUseSystemTheme->get_active (); Gdk::RGBA cropCol = butCropCol->get_rgba(); moptions.cutOverlayBrush[0] = cropCol.get_red(); @@ -1605,7 +1586,6 @@ void Preferences::fillPreferences () languages->set_active_text (moptions.language); ckbLangAutoDetect->set_active (moptions.languageAutoDetect); theme->set_active_text (moptions.theme); - chUseSystemTheme->set_active(moptions.useSystemTheme); Gdk::RGBA cropCol; cropCol.set_rgba(moptions.cutOverlayBrush[0], moptions.cutOverlayBrush[1], moptions.cutOverlayBrush[2]); @@ -1851,7 +1831,6 @@ void Preferences::themeChanged () { moptions.theme = theme->get_active_text (); - moptions.useSystemTheme = chUseSystemTheme->get_active (); RTImage::setPaths(moptions); RTImage::updateImages(); switchThemeTo(theme->get_active_text ()); @@ -2041,16 +2020,6 @@ void Preferences::workflowUpdate () } -void Preferences::useThemeChanged() -{ - - if(!chUseSystemTheme->get_active()) { - theme->set_sensitive(true); - } else { - theme->set_sensitive(false); - } -} - void Preferences::addExtPressed () { diff --git a/rtgui/preferences.h b/rtgui/preferences.h index fe96f7cfe..a1706f954 100644 --- a/rtgui/preferences.h +++ b/rtgui/preferences.h @@ -128,7 +128,6 @@ protected: Gtk::ComboBoxText* curveBBoxPosC; Gtk::ComboBoxText* theme; - Gtk::CheckButton* chUseSystemTheme; Gtk::ColorButton* butCropCol; Gtk::ColorButton* butNavGuideCol; @@ -191,7 +190,7 @@ protected: Glib::ustring storedValueImg; Options moptions; - sigc::connection tconn, sconn, usethcon, addc, setc, dfconn, ffconn, bpconn, rpconn, ipconn; + sigc::connection tconn, sconn, addc, setc, dfconn, ffconn, bpconn, rpconn, ipconn; sigc::connection autoMonProfileConn, sndEnableConn, langAutoDetectConn, autocielabConn; Glib::ustring initialTheme; Glib::ustring initialFont; @@ -203,7 +202,6 @@ protected: void updateFFinfos (); void workflowUpdate(); void themeChanged (); - void useThemeChanged(); void forRAWComboChanged (); void forImageComboChanged (); void layoutComboChanged ();