Cleaning up the Preference's GUI, starting from the General tab

This commit is contained in:
Hombre
2015-10-07 23:59:50 +02:00
parent 9dcb00045d
commit d8e4709458
5 changed files with 182 additions and 142 deletions

View File

@@ -901,7 +901,7 @@ PREFERENCES_EDITORLAYOUT;Disposition de l'éditeur
PREFERENCES_EXPAUT;Expert PREFERENCES_EXPAUT;Expert
PREFERENCES_EXTERNALEDITOR;Éditeur externe PREFERENCES_EXTERNALEDITOR;Éditeur externe
PREFERENCES_FBROWSEROPTS;Options du navigateur de fichiers et de vignettes PREFERENCES_FBROWSEROPTS;Options du navigateur de fichiers et de vignettes
PREFERENCES_FILEBROWSERTOOLBARSINGLEROW;Barre de menu de l'explorateur de fichiers uni-ligne (à désactiver pour les écrans de faible résolution) PREFERENCES_FILEBROWSERTOOLBARSINGLEROW;Barre de menu de l'explorateur de fichiers uni-ligne\n(à désactiver pour les écrans de faible résolution)
PREFERENCES_FILEFORMAT;Format du fichier PREFERENCES_FILEFORMAT;Format du fichier
PREFERENCES_FILMSIMULATION;Simulation de Film PREFERENCES_FILMSIMULATION;Simulation de Film
PREFERENCES_FLATFIELDFOUND;Trouvé PREFERENCES_FLATFIELDFOUND;Trouvé

View File

@@ -84,6 +84,10 @@ GtkFrame {
padding: 2px; padding: 2px;
} }
GtkFrame GtkGrid {
padding: 2px 2px;
}
GtkNotebook { GtkNotebook {
padding: 2px; padding: 2px;
} }

View File

@@ -86,6 +86,10 @@ GtkFrame {
padding: 4px 4px; padding: 4px 4px;
} }
GtkFrame GtkGrid {
padding: 4px 4px;
}
GtkNotebook { GtkNotebook {
padding: 4px; padding: 4px;
} }

View File

@@ -787,15 +787,22 @@ Gtk::Widget* Preferences::getColorManagementPanel ()
Gtk::Widget* Preferences::getGeneralPanel () Gtk::Widget* Preferences::getGeneralPanel ()
{ {
Gtk::VBox* mvbsd = Gtk::manage( new Gtk::VBox () ); Gtk::Grid* mvbsd = Gtk::manage( new Gtk::Grid () );
mvbsd->set_column_spacing(4);
mvbsd->set_row_spacing(4);
Gtk::Frame* fworklflow = Gtk::manage (new Gtk::Frame (M("PREFERENCES_WORKFLOW"))); Gtk::Frame* fworklflow = Gtk::manage (new Gtk::Frame (M("PREFERENCES_WORKFLOW")));
Gtk::VBox* vbworkflow = Gtk::manage (new Gtk::VBox (false, 4)); fworklflow->set_border_width(4);
vbworkflow->set_border_width (4); setExpandAlignProperties(fworklflow, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START);
Gtk::Grid* workflowGrid = Gtk::manage (new Gtk::Grid());
workflowGrid->set_column_spacing(4);
workflowGrid->set_row_spacing(4);
setExpandAlignProperties(workflowGrid, false, false, Gtk::ALIGN_FILL, Gtk::ALIGN_FILL);
Gtk::HBox* hbworkflow = Gtk::manage (new Gtk::HBox (false, 4));
Gtk::Label* flayoutlab = Gtk::manage (new Gtk::Label (M("PREFERENCES_EDITORLAYOUT") + ":")); Gtk::Label* flayoutlab = Gtk::manage (new Gtk::Label (M("PREFERENCES_EDITORLAYOUT") + ":"));
setExpandAlignProperties(flayoutlab, false, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE);
editorLayout = Gtk::manage (new Gtk::ComboBoxText ()); editorLayout = Gtk::manage (new Gtk::ComboBoxText ());
setExpandAlignProperties(editorLayout, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_BASELINE);
editorLayout->append (M("PREFERENCES_SINGLETAB")); editorLayout->append (M("PREFERENCES_SINGLETAB"));
editorLayout->append (M("PREFERENCES_SINGLETABVERTAB")); editorLayout->append (M("PREFERENCES_SINGLETABVERTAB"));
editorLayout->append (M("PREFERENCES_MULTITAB")); editorLayout->append (M("PREFERENCES_MULTITAB"));
@@ -803,61 +810,72 @@ Gtk::Widget* Preferences::getGeneralPanel ()
editorLayout->set_active (2); editorLayout->set_active (2);
editorLayout->signal_changed().connect (sigc::mem_fun(*this, &Preferences::layoutComboChanged)); editorLayout->signal_changed().connect (sigc::mem_fun(*this, &Preferences::layoutComboChanged));
layoutComboChanged(); // update the tooltip layoutComboChanged(); // update the tooltip
hbworkflow->pack_start (*flayoutlab, Gtk::PACK_SHRINK);
hbworkflow->pack_start (*editorLayout);
Gtk::Label* lNextStart = Gtk::manage( new Gtk::Label (Glib::ustring("(") + M("PREFERENCES_APPLNEXTSTARTUP") + ")") ); Gtk::Label* lNextStart = Gtk::manage( new Gtk::Label (Glib::ustring("(") + M("PREFERENCES_APPLNEXTSTARTUP") + ")") );
hbworkflow->pack_end (*lNextStart, Gtk::PACK_SHRINK); setExpandAlignProperties(lNextStart, false, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE);
vbworkflow->pack_start (*hbworkflow, Gtk::PACK_SHRINK); workflowGrid->attach_next_to(*flayoutlab, Gtk::POS_LEFT, 1, 1);
workflowGrid->attach_next_to(*editorLayout, *flayoutlab, Gtk::POS_RIGHT, 1, 1);
workflowGrid->attach_next_to(*lNextStart, *editorLayout, Gtk::POS_RIGHT, 1, 1);
Gtk::HBox* curveBBoxPosHB = Gtk::manage (new Gtk::HBox (false, 4));
Gtk::Label* curveBBoxPosL = Gtk::manage (new Gtk::Label (M("PREFERENCES_CURVEBBOXPOS") + ":")); Gtk::Label* curveBBoxPosL = Gtk::manage (new Gtk::Label (M("PREFERENCES_CURVEBBOXPOS") + ":"));
Gtk::Label* curveBBoxPosRestartL = Gtk::manage (new Gtk::Label (Glib::ustring("(") + M("PREFERENCES_APPLNEXTSTARTUP") + ")")); setExpandAlignProperties(curveBBoxPosL, false, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE);
curveBBoxPosC = Gtk::manage (new Gtk::ComboBoxText ()); curveBBoxPosC = Gtk::manage (new Gtk::ComboBoxText ());
setExpandAlignProperties(curveBBoxPosC, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_BASELINE);
curveBBoxPosC->append (M("PREFERENCES_CURVEBBOXPOS_ABOVE")); curveBBoxPosC->append (M("PREFERENCES_CURVEBBOXPOS_ABOVE"));
curveBBoxPosC->append (M("PREFERENCES_CURVEBBOXPOS_RIGHT")); curveBBoxPosC->append (M("PREFERENCES_CURVEBBOXPOS_RIGHT"));
curveBBoxPosC->append (M("PREFERENCES_CURVEBBOXPOS_BELOW")); curveBBoxPosC->append (M("PREFERENCES_CURVEBBOXPOS_BELOW"));
curveBBoxPosC->append (M("PREFERENCES_CURVEBBOXPOS_LEFT")); curveBBoxPosC->append (M("PREFERENCES_CURVEBBOXPOS_LEFT"));
curveBBoxPosC->set_active (1); curveBBoxPosC->set_active (1);
curveBBoxPosHB->pack_start (*curveBBoxPosL, Gtk::PACK_SHRINK); Gtk::Label* curveBBoxPosRestartL = Gtk::manage (new Gtk::Label (Glib::ustring("(") + M("PREFERENCES_APPLNEXTSTARTUP") + ")"));
curveBBoxPosHB->pack_start (*curveBBoxPosC); setExpandAlignProperties(curveBBoxPosRestartL, false, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE);
curveBBoxPosHB->pack_start (*curveBBoxPosRestartL, Gtk::PACK_SHRINK); workflowGrid->attach_next_to(*curveBBoxPosL, *flayoutlab, Gtk::POS_BOTTOM, 1, 1);
vbworkflow->pack_start (*curveBBoxPosHB, Gtk::PACK_SHRINK); workflowGrid->attach_next_to(*curveBBoxPosC, *editorLayout, Gtk::POS_BOTTOM, 1, 1);
workflowGrid->attach_next_to(*curveBBoxPosRestartL, *lNextStart, Gtk::POS_BOTTOM, 1, 1);
Gtk::HBox* hbworkflow2 = Gtk::manage( new Gtk::HBox () );
ckbHistogramPositionLeft = Gtk::manage( new Gtk::CheckButton (M("PREFERENCES_HISTOGRAMPOSITIONLEFT")) ); ckbHistogramPositionLeft = Gtk::manage( new Gtk::CheckButton (M("PREFERENCES_HISTOGRAMPOSITIONLEFT")) );
hbworkflow2->pack_start (*ckbHistogramPositionLeft); setExpandAlignProperties(ckbHistogramPositionLeft, false, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE);
ckbHistogramWorking = Gtk::manage( new Gtk::CheckButton (M("PREFERENCES_HISTOGRAMWORKING")) ); ckbHistogramWorking = Gtk::manage( new Gtk::CheckButton (M("PREFERENCES_HISTOGRAMWORKING")) );
setExpandAlignProperties(ckbHistogramWorking, false, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE);
ckbHistogramWorking->set_tooltip_markup (M("PREFERENCES_HISTOGRAM_TOOLTIP")); ckbHistogramWorking->set_tooltip_markup (M("PREFERENCES_HISTOGRAM_TOOLTIP"));
hbworkflow2->pack_start (*ckbHistogramWorking); workflowGrid->attach_next_to(*ckbHistogramPositionLeft, *curveBBoxPosL, Gtk::POS_BOTTOM, 1, 1);
vbworkflow->pack_start (*hbworkflow2, Gtk::PACK_SHRINK); workflowGrid->attach_next_to(*ckbHistogramWorking, *curveBBoxPosC, Gtk::POS_BOTTOM, 2, 1);
Gtk::HBox* hbworkflow3 = Gtk::manage( new Gtk::HBox () );
ckbFileBrowserToolbarSingleRow = Gtk::manage( new Gtk::CheckButton (M("PREFERENCES_FILEBROWSERTOOLBARSINGLEROW")) ); ckbFileBrowserToolbarSingleRow = Gtk::manage( new Gtk::CheckButton (M("PREFERENCES_FILEBROWSERTOOLBARSINGLEROW")) );
setExpandAlignProperties(ckbFileBrowserToolbarSingleRow, false, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE);
ckbShowFilmStripToolBar = Gtk::manage( new Gtk::CheckButton (M("PREFERENCES_SHOWFILMSTRIPTOOLBAR")) ); ckbShowFilmStripToolBar = Gtk::manage( new Gtk::CheckButton (M("PREFERENCES_SHOWFILMSTRIPTOOLBAR")) );
hbworkflow3->pack_start (*ckbFileBrowserToolbarSingleRow); setExpandAlignProperties(ckbShowFilmStripToolBar, false, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE);
hbworkflow3->pack_start (*ckbShowFilmStripToolBar); workflowGrid->attach_next_to(*ckbFileBrowserToolbarSingleRow, *ckbHistogramPositionLeft, Gtk::POS_BOTTOM, 1, 1);
vbworkflow->pack_start (*hbworkflow3, Gtk::PACK_SHRINK); workflowGrid->attach_next_to(*ckbShowFilmStripToolBar, *ckbHistogramWorking, Gtk::POS_BOTTOM, 2, 1);
Gtk::HBox* hbworkflow4 = Gtk::manage( new Gtk::HBox (false, 4) );
Gtk::Label* hb4label = Gtk::manage( new Gtk::Label (M("PREFERENCES_TP_LABEL")) ); Gtk::Label* hb4label = Gtk::manage( new Gtk::Label (M("PREFERENCES_TP_LABEL")) );
hbworkflow4->pack_start (*hb4label, Gtk::PACK_SHRINK); setExpandAlignProperties(hb4label, false, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE);
ckbHideTPVScrollbar = Gtk::manage( new Gtk::CheckButton (M("PREFERENCES_TP_VSCROLLBAR")) ); ckbHideTPVScrollbar = Gtk::manage( new Gtk::CheckButton (M("PREFERENCES_TP_VSCROLLBAR")) );
hbworkflow4->pack_start (*ckbHideTPVScrollbar, Gtk::PACK_SHRINK); setExpandAlignProperties(ckbHideTPVScrollbar, false, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE);
ckbUseIconNoText = Gtk::manage( new Gtk::CheckButton (M("PREFERENCES_TP_USEICONORTEXT")) ); ckbUseIconNoText = Gtk::manage( new Gtk::CheckButton (M("PREFERENCES_TP_USEICONORTEXT")) );
hbworkflow4->pack_start (*ckbUseIconNoText, Gtk::PACK_SHRINK); setExpandAlignProperties(ckbUseIconNoText, false, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE);
vbworkflow->pack_start (*hbworkflow4, Gtk::PACK_SHRINK); workflowGrid->attach_next_to(*hb4label, *ckbFileBrowserToolbarSingleRow, Gtk::POS_BOTTOM, 1, 1);
workflowGrid->attach_next_to(*ckbHideTPVScrollbar, *hb4label, Gtk::POS_RIGHT, 1, 1);
workflowGrid->attach_next_to(*ckbUseIconNoText, *ckbHideTPVScrollbar, Gtk::POS_RIGHT, 1, 1);
fworklflow->add (*vbworkflow); fworklflow->add (*workflowGrid);
mvbsd->pack_start (*fworklflow, Gtk::PACK_SHRINK); mvbsd->attach_next_to(*fworklflow, Gtk::POS_TOP, 2, 1);
// ---------------------------------------------
Gtk::Frame* flang = Gtk::manage( new Gtk::Frame (M("PREFERENCES_DEFAULTLANG")) ); Gtk::Frame* flang = Gtk::manage( new Gtk::Frame (M("PREFERENCES_DEFAULTLANG")) );
Gtk::HBox* hblang = Gtk::manage( new Gtk::HBox () ); flang->set_border_width(4);
hblang->set_border_width (4); setExpandAlignProperties(flang, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START);
Gtk::Grid* langGrid = Gtk::manage( new Gtk::Grid() );
langGrid->set_column_spacing(4);
langGrid->set_row_spacing(4);
setExpandAlignProperties(langGrid, false, false, Gtk::ALIGN_FILL, Gtk::ALIGN_BASELINE);
ckbLangAutoDetect = Gtk::manage( new Gtk::CheckButton (M("PREFERENCES_LANGAUTODETECT")) ); ckbLangAutoDetect = Gtk::manage( new Gtk::CheckButton (M("PREFERENCES_LANGAUTODETECT")) );
setExpandAlignProperties(ckbLangAutoDetect, false, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE);
Gtk::Label* langlab = Gtk::manage( new Gtk::Label (M("PREFERENCES_SELECTLANG") + ":") ); 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 () ); languages = Gtk::manage( new Gtk::ComboBoxText () );
setExpandAlignProperties(languages, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_BASELINE);
std::vector<Glib::ustring> langs; std::vector<Glib::ustring> langs;
parseDir (argv0 + "/languages", langs, ""); parseDir (argv0 + "/languages", langs, "");
@@ -869,43 +887,35 @@ Gtk::Widget* Preferences::getGeneralPanel ()
} }
Gtk::Label* langw = Gtk::manage( new Gtk::Label (Glib::ustring(" (") + M("PREFERENCES_APPLNEXTSTARTUP") + ")") ); Gtk::Label* langw = Gtk::manage( new Gtk::Label (Glib::ustring(" (") + M("PREFERENCES_APPLNEXTSTARTUP") + ")") );
hblang->pack_start (*ckbLangAutoDetect, Gtk::PACK_SHRINK, 4); setExpandAlignProperties(langw, false, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE);
hblang->pack_start (*langlab, Gtk::PACK_SHRINK, 8); langGrid->attach_next_to(*ckbLangAutoDetect, Gtk::POS_LEFT, 1, 1);
hblang->pack_start (*languages); langGrid->attach_next_to(*langlab, *ckbLangAutoDetect, Gtk::POS_RIGHT, 1, 1);
hblang->pack_end (*langw, Gtk::PACK_SHRINK, 4); langGrid->attach_next_to(*languages, *langlab, Gtk::POS_RIGHT, 1, 1);
flang->add (*hblang); langGrid->attach_next_to(*langw, *languages, Gtk::POS_RIGHT, 1, 1);
mvbsd->pack_start (*flang, Gtk::PACK_SHRINK, 4); flang->add (*langGrid);
mvbsd->attach_next_to(*flang, *fworklflow, Gtk::POS_BOTTOM, 2, 1);
langAutoDetectConn = ckbLangAutoDetect->signal_toggled().connect (sigc::mem_fun(*this, &Preferences::langAutoDetectToggled)); // ---------------------------------------------
Gtk::Frame* ftheme = Gtk::manage( new Gtk::Frame (M("PREFERENCES_DEFAULTTHEME")) ); Gtk::Frame* ftheme = Gtk::manage( new Gtk::Frame (M("PREFERENCES_DEFAULTTHEME")) );
Gtk::VBox* vbftheme = Gtk::manage( new Gtk::VBox () ); ftheme->set_border_width(4);
vbftheme->set_border_width(4); setExpandAlignProperties(ftheme, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START);
vbftheme->set_spacing(4); Gtk::Grid* themeGrid = Gtk::manage( new Gtk::Grid() );
Gtk::HBox* hbUseSystemTheme = Gtk::manage( new Gtk::HBox () ); themeGrid->set_column_spacing(4);
hbUseSystemTheme->set_spacing(4); themeGrid->set_row_spacing(4);
chUseSystemTheme = Gtk::manage( new Gtk::CheckButton (M("PREFERENCES_USESYSTEMTHEME")) ); setExpandAlignProperties(themeGrid, false, false, Gtk::ALIGN_FILL, Gtk::ALIGN_FILL);
Gtk::Label* useNextStart = Gtk::manage( new Gtk::Label (Glib::ustring("(") + M("PREFERENCES_APPLNEXTSTARTUP") + ")") );
Gtk::Label* cutOverlayLabel = Gtk::manage( new Gtk::Label (M("PREFERENCES_CUTOVERLAYBRUSH") + ":") );
butCropCol = Gtk::manage( new Gtk::ColorButton() );
butCropCol->set_use_alpha(true);
Gtk::Label* navGuideLabel = Gtk::manage( new Gtk::Label (M("PREFERENCES_NAVGUIDEBRUSH") + ":") );
butNavGuideCol = Gtk::manage( new Gtk::ColorButton() );
butNavGuideCol->set_use_alpha(true);
chUseSystemTheme = Gtk::manage( new Gtk::CheckButton (M("PREFERENCES_USESYSTEMTHEME")+" ("+ M("PREFERENCES_APPLNEXTSTARTUP") + ")") );
setExpandAlignProperties(chUseSystemTheme, false, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE);
slimUI = Gtk::manage( new Gtk::CheckButton (M("PREFERENCES_SLIMUI")) ); slimUI = Gtk::manage( new Gtk::CheckButton (M("PREFERENCES_SLIMUI")) );
hbUseSystemTheme->pack_start(*chUseSystemTheme, Gtk::PACK_SHRINK); setExpandAlignProperties(slimUI, false, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE);
hbUseSystemTheme->pack_start (*useNextStart, Gtk::PACK_SHRINK, 0); themeGrid->attach_next_to(*chUseSystemTheme, Gtk::POS_LEFT, 2, 1);
hbUseSystemTheme->pack_end(*slimUI, Gtk::PACK_SHRINK, 0); themeGrid->attach_next_to(*slimUI, *chUseSystemTheme, Gtk::POS_RIGHT, 2, 1);
vbftheme->pack_start(*hbUseSystemTheme, Gtk::PACK_SHRINK, 0);
hbtheme = Gtk::manage( new Gtk::HBox () );
hbtheme->set_spacing (4);
Gtk::Label* themelab = Gtk::manage( new Gtk::Label (M("PREFERENCES_SELECTTHEME") + ":") ); 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 () ); theme = Gtk::manage( new Gtk::ComboBoxText () );
setExpandAlignProperties(theme, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_BASELINE);
theme->set_active (0); theme->set_active (0);
std::vector<Glib::ustring> themes; std::vector<Glib::ustring> themes;
@@ -916,150 +926,173 @@ Gtk::Widget* Preferences::getGeneralPanel ()
} }
Gtk::Label* fontlab = Gtk::manage( new Gtk::Label (M("PREFERENCES_SELECTFONT") + ":") ); Gtk::Label* fontlab = Gtk::manage( new Gtk::Label (M("PREFERENCES_SELECTFONT") + ":") );
setExpandAlignProperties(fontlab, false, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE);
fontbutton = Gtk::manage( new Gtk::FontButton ()); fontbutton = Gtk::manage( new Gtk::FontButton ());
setExpandAlignProperties(fontbutton, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_BASELINE);
fontbutton->set_use_size(true); fontbutton->set_use_size(true);
fontbutton->set_font_name(options.font); fontbutton->set_font_name(options.font);
hbtheme->pack_start (*themelab, Gtk::PACK_SHRINK, 0); themeGrid->attach_next_to(*themelab, *chUseSystemTheme, Gtk::POS_BOTTOM, 1, 1);
hbtheme->pack_start (*theme); themeGrid->attach_next_to(*theme, *themelab, Gtk::POS_RIGHT, 1, 1);
hbtheme->pack_start (*fontlab, Gtk::PACK_SHRINK, 0); themeGrid->attach_next_to(*fontlab, *theme, Gtk::POS_RIGHT, 1, 1);
hbtheme->pack_start (*fontbutton); themeGrid->attach_next_to(*fontbutton, *fontlab, Gtk::POS_RIGHT, 1, 1);
vbftheme->pack_start(*hbtheme, Gtk::PACK_SHRINK, 0);
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);
Gtk::HBox* hbcolorchooser = Gtk::manage( new Gtk::HBox () ); Gtk::Grid* navguidecolGrid = Gtk::manage( new Gtk::Grid () );
hbcolorchooser->set_spacing(4); 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);
hbcolorchooser->pack_start (*cutOverlayLabel, Gtk::PACK_SHRINK, 0); themeGrid->attach_next_to(*cropcolorGrid, *themelab, Gtk::POS_BOTTOM, 2, 1);
hbcolorchooser->pack_start (*butCropCol, Gtk::PACK_SHRINK, 0); themeGrid->attach_next_to(*navguidecolGrid, *cropcolorGrid, Gtk::POS_RIGHT, 2, 1);
hbcolorchooser->pack_end (*butNavGuideCol, Gtk::PACK_SHRINK, 0);
hbcolorchooser->pack_end (*navGuideLabel, Gtk::PACK_SHRINK, 0);
vbftheme->pack_start(*hbcolorchooser, Gtk::PACK_SHRINK, 0);
ftheme->add (*themeGrid);
mvbsd->attach_next_to(*ftheme, *flang, Gtk::POS_BOTTOM, 2, 1);
ftheme->add (*vbftheme); // ---------------------------------------------
mvbsd->pack_start (*ftheme, Gtk::PACK_SHRINK, 0);
//----- Gtk::Frame* fclip = Gtk::manage( new Gtk::Frame (M("PREFERENCES_CLIPPINGIND")));
fclip->set_border_width(4);
setExpandAlignProperties(fclip, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_FILL);
Gtk::Grid* clipGrid = Gtk::manage( new Gtk::Grid() );
clipGrid->set_column_spacing(4);
clipGrid->set_row_spacing(4);
setExpandAlignProperties(clipGrid, false, false, Gtk::ALIGN_FILL, Gtk::ALIGN_FILL);
Gtk::HBox* hbcd = Gtk::manage( new Gtk::HBox (true) );
hbcd->set_spacing(4);
Gtk::Frame* frl = Gtk::manage( new Gtk::Frame (M("PREFERENCES_CLIPPINGIND")));
Gtk::VBox* vbrl = Gtk::manage( new Gtk::VBox () );
vbrl->set_border_width(4);
vbrl->set_spacing (4);
Gtk::HBox* vbhl = Gtk::manage( new Gtk::HBox () );
vbhl->set_spacing(4);
Gtk::Label* hll = Gtk::manage( new Gtk::Label (M("PREFERENCES_HLTHRESHOLD") + ": ")); Gtk::Label* hll = Gtk::manage( new Gtk::Label (M("PREFERENCES_HLTHRESHOLD") + ": "));
setExpandAlignProperties(hll, true, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE);
hlThresh = Gtk::manage( new Gtk::SpinButton () ); hlThresh = Gtk::manage( new Gtk::SpinButton () );
setExpandAlignProperties(hlThresh, false, false, Gtk::ALIGN_END, Gtk::ALIGN_BASELINE);
hlThresh->set_digits (0); hlThresh->set_digits (0);
hlThresh->set_increments (1, 10); hlThresh->set_increments (1, 10);
hlThresh->set_range (0, 255); hlThresh->set_range (0, 255);
vbhl->pack_start (*hll, Gtk::PACK_SHRINK, 0); clipGrid->attach_next_to(*hll, Gtk::POS_LEFT, 1, 1);
vbhl->pack_end (*hlThresh, Gtk::PACK_SHRINK, 0); clipGrid->attach_next_to(*hlThresh, *hll, Gtk::POS_RIGHT, 1, 1);
vbrl->pack_start (*vbhl, Gtk::PACK_SHRINK, 0);
Gtk::HBox* vbsh = Gtk::manage( new Gtk::HBox () );
vbsh->set_spacing (4);
Gtk::Label* shl = Gtk::manage( new Gtk::Label (M("PREFERENCES_SHTHRESHOLD") + ": ") ); Gtk::Label* shl = Gtk::manage( new Gtk::Label (M("PREFERENCES_SHTHRESHOLD") + ": ") );
setExpandAlignProperties(shl, true, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE);
shThresh = Gtk::manage( new Gtk::SpinButton () ); shThresh = Gtk::manage( new Gtk::SpinButton () );
setExpandAlignProperties(shThresh, false, false, Gtk::ALIGN_END, Gtk::ALIGN_BASELINE);
shThresh->show (); shThresh->show ();
shThresh->set_digits (0); shThresh->set_digits (0);
shThresh->set_increments (1, 10); shThresh->set_increments (1, 10);
shThresh->set_range (0, 255); shThresh->set_range (0, 255);
vbsh->pack_start (*shl, Gtk::PACK_SHRINK, 0); clipGrid->attach_next_to(*shl, *hll, Gtk::POS_BOTTOM, 1, 1);
vbsh->pack_end (*shThresh, Gtk::PACK_SHRINK, 0); clipGrid->attach_next_to(*shThresh, *shl, Gtk::POS_RIGHT, 1, 1);
vbrl->pack_start (*vbsh, Gtk::PACK_SHRINK, 0);
frl->add (*vbrl); fclip->add (*clipGrid);
hbcd->pack_start (*frl, true, true, 0); mvbsd->attach_next_to(*fclip, *ftheme, Gtk::POS_BOTTOM, 1, 1);
//--- // ---------------------------------------------
Gtk::Frame* navigationFrame = Gtk::manage( new Gtk::Frame (M("PREFERENCES_NAVIGATIONFRAME")) ); Gtk::Frame* fnav = Gtk::manage( new Gtk::Frame (M("PREFERENCES_NAVIGATIONFRAME")) );
Gtk::VBox* navigationVBox = Gtk::manage( new Gtk::VBox () ); fnav->set_border_width(4);
navigationVBox->set_border_width(4); setExpandAlignProperties(fclip, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_FILL);
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);
Gtk::HBox* panFactorHBox = Gtk::manage( new Gtk::HBox () );
Gtk::Label* panFactorLabel = Gtk::manage( new Gtk::Label (M("PREFERENCES_PANFACTORLABEL") + ":", Gtk::ALIGN_START)); Gtk::Label* panFactorLabel = Gtk::manage( new Gtk::Label (M("PREFERENCES_PANFACTORLABEL") + ":", Gtk::ALIGN_START));
setExpandAlignProperties(panFactorLabel, true, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE);
panFactor = Gtk::manage( new Gtk::SpinButton () ); panFactor = Gtk::manage( new Gtk::SpinButton () );
setExpandAlignProperties(panFactor, false, false, Gtk::ALIGN_END, Gtk::ALIGN_BASELINE);
panFactor->set_digits (0); panFactor->set_digits (0);
panFactor->set_increments (1, 5); panFactor->set_increments (1, 5);
panFactor->set_range (1, 10); panFactor->set_range (1, 10);
panFactorHBox->pack_start (*panFactorLabel); navigationGrid->attach_next_to(*panFactorLabel, Gtk::POS_LEFT, 1, 1);
panFactorHBox->pack_end (*panFactor, Gtk::PACK_SHRINK); navigationGrid->attach_next_to(*panFactor, *panFactorLabel, Gtk::POS_RIGHT, 1, 1);
rememberZoomPanCheckbutton = Gtk::manage( new Gtk::CheckButton (M("PREFERENCES_REMEMBERZOOMPAN")) ); rememberZoomPanCheckbutton = Gtk::manage( new Gtk::CheckButton (M("PREFERENCES_REMEMBERZOOMPAN")) );
setExpandAlignProperties(rememberZoomPanCheckbutton, false, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE);
rememberZoomPanCheckbutton->set_tooltip_text(M("PREFERENCES_REMEMBERZOOMPAN_TOOLTIP")); rememberZoomPanCheckbutton->set_tooltip_text(M("PREFERENCES_REMEMBERZOOMPAN_TOOLTIP"));
navigationVBox->pack_start (*panFactorHBox, Gtk::PACK_SHRINK); navigationGrid->attach_next_to(*rememberZoomPanCheckbutton, *panFactorLabel, Gtk::POS_BOTTOM, 2, 1);
navigationVBox->pack_start (*rememberZoomPanCheckbutton, Gtk::PACK_SHRINK);
navigationFrame->add (*navigationVBox);
hbcd->pack_start (*navigationFrame); fnav->add (*navigationGrid);
mvbsd->pack_start (*hbcd, Gtk::PACK_SHRINK, 0); mvbsd->attach_next_to(*fnav, *fclip, Gtk::POS_RIGHT, 1, 1);
//----- // ---------------------------------------------
Gtk::Frame* fdg = Gtk::manage( new Gtk::Frame (M("PREFERENCES_EXTERNALEDITOR")) ); Gtk::Frame* fdg = Gtk::manage( new Gtk::Frame (M("PREFERENCES_EXTERNALEDITOR")) );
Gtk::VBox* dgvb = Gtk::manage( new Gtk::VBox () ); fdg->set_border_width(4);
setExpandAlignProperties(fdg, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_FILL);
Gtk::Grid* externaleditorGrid = Gtk::manage( new Gtk::Grid() );
externaleditorGrid->set_column_spacing(4);
externaleditorGrid->set_row_spacing(4);
setExpandAlignProperties(externaleditorGrid, false, false, Gtk::ALIGN_FILL, Gtk::ALIGN_FILL);
Gtk::HBox* hb7c = Gtk::manage( new Gtk::HBox () );
edOther = Gtk::manage( new Gtk::RadioButton (M("PREFERENCES_EDITORCMDLINE") + ":")); edOther = Gtk::manage( new Gtk::RadioButton (M("PREFERENCES_EDITORCMDLINE") + ":"));
hb7c->pack_start (*edOther, Gtk::PACK_SHRINK, 4); setExpandAlignProperties(edOther, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER);
editorToSendTo = Gtk::manage( new Gtk::Entry () ); editorToSendTo = Gtk::manage( new Gtk::Entry () );
hb7c->pack_start (*editorToSendTo); setExpandAlignProperties(editorToSendTo, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_BASELINE);
Gtk::RadioButton::Group ge = edOther->get_group(); Gtk::RadioButton::Group ge = edOther->get_group();
#ifdef __APPLE__ #ifdef __APPLE__
Gtk::HBox* hb7 = Gtk::manage( new Gtk::HBox () );
edGimp = Gtk::manage( new Gtk::RadioButton ("GIMP") ); edGimp = Gtk::manage( new Gtk::RadioButton ("GIMP") );
hb7->pack_start (*edGimp, Gtk::PACK_SHRINK, 4); setExpandAlignProperties(edGimp, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER);
dgvb->pack_start (*hb7, Gtk::PACK_SHRINK, 4);
edGimp->set_group (ge); edGimp->set_group (ge);
externaleditorGrid->attach_next_to(*edGimp, Gtk::POS_TOP, 2, 1);
Gtk::HBox* hb7b = Gtk::manage( new Gtk::HBox () );
edPS = Gtk::manage( new Gtk::RadioButton (M("PREFERENCES_PSPATH") + ":")); edPS = Gtk::manage( new Gtk::RadioButton (M("PREFERENCES_PSPATH") + ":"));
hb7b->pack_start (*edPS, Gtk::PACK_SHRINK, 4); setExpandAlignProperties(edPS, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER);
psDir = Gtk::manage( new Gtk::FileChooserButton (M("PREFERENCES_PSPATH"), Gtk::FILE_CHOOSER_ACTION_SELECT_FOLDER) ); psDir = Gtk::manage( new Gtk::FileChooserButton (M("PREFERENCES_PSPATH"), Gtk::FILE_CHOOSER_ACTION_SELECT_FOLDER) );
hb7b->pack_start (*psDir); setExpandAlignProperties(psDir, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER);
dgvb->pack_start (*hb7b, Gtk::PACK_SHRINK, 4); externaleditorGrid->attach_next_to(*edPS, *edGimp, Gtk::POS_BOTTOM, 1, 1);
externaleditorGrid->attach_next_to(*psDir, *edPS, Gtk::POS_RIGHT, 1, 1);
edPS->set_group (ge); edPS->set_group (ge);
externaleditorGrid->attach_next_to(*edOther, *edPS, Gtk::POS_BOTTOM, 1, 1);
externaleditorGrid->attach_next_to(*editorToSendTo, *edOther, Gtk::POS_RIGHT, 1, 1);
#elif defined WIN32 #elif defined WIN32
Gtk::HBox* hb7 = Gtk::manage( new Gtk::HBox () );
edGimp = Gtk::manage( new Gtk::RadioButton (M("PREFERENCES_GIMPPATH") + ":") ); edGimp = Gtk::manage( new Gtk::RadioButton (M("PREFERENCES_GIMPPATH") + ":") );
hb7->pack_start (*edGimp, Gtk::PACK_SHRINK, 4); setExpandAlignProperties(edGimp, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER);
gimpDir = Gtk::manage( new Gtk::FileChooserButton (M("PREFERENCES_GIMPPATH"), Gtk::FILE_CHOOSER_ACTION_SELECT_FOLDER) ); gimpDir = Gtk::manage( new Gtk::FileChooserButton (M("PREFERENCES_GIMPPATH"), Gtk::FILE_CHOOSER_ACTION_SELECT_FOLDER) );
hb7->pack_start (*gimpDir); setExpandAlignProperties(gimpDir, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER);
dgvb->pack_start (*hb7, Gtk::PACK_SHRINK, 4); externaleditorGrid->attach_next_to(*edGimp, Gtk::POS_TOP, 1, 1);
externaleditorGrid->attach_next_to(*gimpDir, *edGimp, Gtk::POS_RIGHT, 1, 1);
edGimp->set_group (ge); edGimp->set_group (ge);
Gtk::HBox* hb7b = Gtk::manage( new Gtk::HBox ());
edPS = Gtk::manage( new Gtk::RadioButton (M("PREFERENCES_PSPATH") + ":") ); edPS = Gtk::manage( new Gtk::RadioButton (M("PREFERENCES_PSPATH") + ":") );
hb7b->pack_start (*edPS, Gtk::PACK_SHRINK, 4); setExpandAlignProperties(edPS, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER);
psDir = Gtk::manage( new Gtk::FileChooserButton (M("PREFERENCES_PSPATH"), Gtk::FILE_CHOOSER_ACTION_SELECT_FOLDER) ); psDir = Gtk::manage( new Gtk::FileChooserButton (M("PREFERENCES_PSPATH"), Gtk::FILE_CHOOSER_ACTION_SELECT_FOLDER) );
hb7b->pack_start (*psDir); setExpandAlignProperties(psDir, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER);
dgvb->pack_start (*hb7b, Gtk::PACK_SHRINK, 4); externaleditorGrid->attach_next_to(*edPS, *edGimp, Gtk::POS_BOTTOM, 1, 1);
externaleditorGrid->attach_next_to(*psDir, *edPS, Gtk::POS_RIGHT, 1, 1);
edPS->set_group (ge); edPS->set_group (ge);
externaleditorGrid->attach_next_to(*edOther, *edPS, Gtk::POS_BOTTOM, 1, 1);
externaleditorGrid->attach_next_to(*editorToSendTo, *edOther, Gtk::POS_RIGHT, 1, 1);
#else #else
Gtk::HBox* hb7 = Gtk::manage( new Gtk::HBox () );
edGimp = Gtk::manage( new Gtk::RadioButton ("GIMP") ); edGimp = Gtk::manage( new Gtk::RadioButton ("GIMP") );
hb7->pack_start (*edGimp, Gtk::PACK_SHRINK, 4); setExpandAlignProperties(edGimp, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER);
dgvb->pack_start (*hb7, Gtk::PACK_SHRINK, 4); externaleditorGrid->attach_next_to(*edGimp, Gtk::POS_TOP, 2, 1);
edGimp->set_group (ge); edGimp->set_group (ge);
externaleditorGrid->attach_next_to(*edOther, *edGimp, Gtk::POS_BOTTOM, 1, 1);
externaleditorGrid->attach_next_to(*editorToSendTo, *edOther, Gtk::POS_RIGHT, 1, 1);
#endif #endif
dgvb->pack_start (*hb7c, Gtk::PACK_SHRINK, 4); fdg->add (*externaleditorGrid);
dgvb->set_border_width (4); mvbsd->attach_next_to(*fdg, *fclip, Gtk::POS_BOTTOM, 2, 1);
fdg->add (*dgvb);
mvbsd->pack_start (*fdg, Gtk::PACK_SHRINK, 4);
mvbsd->set_border_width (4);
langAutoDetectConn = ckbLangAutoDetect->signal_toggled().connect (sigc::mem_fun(*this, &Preferences::langAutoDetectToggled));
tconn = theme->signal_changed().connect( sigc::mem_fun(*this, &Preferences::themeChanged) ); tconn = theme->signal_changed().connect( sigc::mem_fun(*this, &Preferences::themeChanged) );
sconn = slimUI->signal_clicked().connect( sigc::mem_fun(*this, &Preferences::themeChanged) ); sconn = slimUI->signal_clicked().connect( sigc::mem_fun(*this, &Preferences::themeChanged) );
fconn = fontbutton->signal_font_set().connect( sigc::mem_fun(*this, &Preferences::fontChanged) ); fconn = fontbutton->signal_font_set().connect( sigc::mem_fun(*this, &Preferences::fontChanged) );
@@ -2098,10 +2131,10 @@ void Preferences::useThemeChanged()
{ {
if(!chUseSystemTheme->get_active()) { if(!chUseSystemTheme->get_active()) {
hbtheme->set_sensitive(true); theme->set_sensitive(true);
fontbutton->set_sensitive(true); fontbutton->set_sensitive(true);
} else { } else {
hbtheme->set_sensitive(false); theme->set_sensitive(false);
fontbutton->set_sensitive(false); fontbutton->set_sensitive(false);
} }
} }

View File

@@ -128,7 +128,6 @@ protected:
Gtk::ComboBoxText* theme; Gtk::ComboBoxText* theme;
Gtk::CheckButton* slimUI; Gtk::CheckButton* slimUI;
Gtk::HBox* hbtheme;
Gtk::CheckButton* chUseSystemTheme; Gtk::CheckButton* chUseSystemTheme;
Gtk::FontButton* fontbutton; Gtk::FontButton* fontbutton;
Gtk::ColorButton* butCropCol; Gtk::ColorButton* butCropCol;