Solving issue #3531, assign classes to Gtk::Window and MyWidget

- Curve editor buttons are set to expand by default, but they are set to
shrink as soon as an accompagnying widget is set to expand
- White Balance's method button now has a centered ellipse ("...")
- White Balance's buttons are now aligned on their right
- A "withScrollbar" class is added to MyExpander if the ToolPanel's
vertical scrollbar is visible. This can let you add padding space for
the scrollbar (see #MyExpander.withScrollbar in RT default theme)
- A "maximized" and "fullscreen" class is added to the RTWindow whenever
it change state ; BEWARE: if you maximize the window then make it
fullscreen, Gtk says that the window is in a "maximized & fullscreen"
state, which mean that both class can be added at the same time to the
window.

One Gtk oddity (at least on Windows) is that you can make your window
fullscreen and still drag it around by its header bar... That's not very
practical to click on the unfullscreen button if in Single Editor mode
with vertical Tab.

I also managed to see the window in a Inconified + Maximized state. This
part of Gtk doesn't seem very robust, on Windows at least.
This commit is contained in:
Hombre
2016-12-20 01:58:37 +01:00
parent 5100126f0d
commit c7be386c3a
14 changed files with 129 additions and 58 deletions

View File

@@ -55,6 +55,12 @@ headerbar {
background-image: none;
}
/* Warning: maximized and fullscreen can be set at the same time ! */
window.maximized > decoration, window.fullscreen > decoration {
padding: 0;
margin: 0;
}
window > decoration, dialog > decoration {
box-shadow: none;
margin: 0px;
@@ -169,25 +175,20 @@ button {
button.flat {
background-image: none;
}
button.popupbutton-arrow {
min-width: 18px;
}
button:hover {
background-image: linear-gradient(#444444, #3E3E3E, #393939);
button.flat:checked {
background-image: linear-gradient(#343434, #2E2E2E, #292929);
}
checkbutton > check {
background-image: linear-gradient(#343434, #2E2E2E, #292929);
}
checkbutton:hover > check {
background-image: linear-gradient(#444444, #3E3E3E, #393939);
}
radiobutton > radio {
background-image: linear-gradient(#343434, #2E2E2E, #292929);
}
radiobutton:hover > radio {
background-image: linear-gradient(#444444, #3E3E3E, #393939);
button:hover , button.flat:hover, checkbutton:hover > check, radiobutton:hover > radio {
background-image: linear-gradient(shade(#343434,1.3), shade(#2E2E2E,1.3), shade(#292929,1.3));
}
button.popupbutton-arrow {
min-width: 18px;
}
combobox {
@@ -337,6 +338,10 @@ entry, spinbutton {
background-color: #262626;
}
spinbutton entry {
padding-right: 6px;
}
entry:disabled, spinbutton:disabled {
background-color: #363636;
}
@@ -372,6 +377,9 @@ menuitem {
margin: 0;
padding: 0;
}
#MyExpander.withScrollbar {
margin-right: 6px;
}
/* Tool background */
#ExpanderBox > box, #ExpanderBox > grid {
@@ -476,8 +484,8 @@ menuitem {
}
#MyExpanderTitle > box {
margin: 2px 0 2px 0;
padding: 2px;
margin: 2px 0;
padding: 2px 0;
}
#MyExpanderTitle label {
@@ -798,7 +806,7 @@ paned.vertical > separator {
}
#RightNotebook #ToolPanelNotebook stack {
margin: 4px;
margin: 0px;
}
#RightNotebook #HistoryPanel {

View File

@@ -40,7 +40,7 @@ ColorToning::ColorToning () : FoldableToolPanel(this, "colortoning", M("TP_COLOR
colorCurveEditorG = new CurveEditorGroup (options.lastColorToningCurvesDir, M("TP_COLORTONING_COLOR"));
colorCurveEditorG->setCurveListener (this);
colorShape = static_cast<FlatCurveEditor*>(colorCurveEditorG->addCurve(CT_Flat, "", nullptr, false));
colorShape = static_cast<FlatCurveEditor*>(colorCurveEditorG->addCurve(CT_Flat, "", nullptr, false, false));
colorShape->setCurveColorProvider(this, 1);
std::vector<GradientMilestone> milestones;
@@ -89,7 +89,7 @@ ColorToning::ColorToning () : FoldableToolPanel(this, "colortoning", M("TP_COLOR
opacityCurveEditorG->setCurveListener (this);
rtengine::ColorToningParams::getDefaultOpacityCurve(defaultCurve);
opacityShape = static_cast<FlatCurveEditor*>(opacityCurveEditorG->addCurve(CT_Flat, "", nullptr, false));
opacityShape = static_cast<FlatCurveEditor*>(opacityCurveEditorG->addCurve(CT_Flat, "", nullptr, false, false));
opacityShape->setIdentityValue(0.);
opacityShape->setResetCurve(FlatCurveType(defaultCurve.at(0)), defaultCurve);
opacityShape->setBottomBarBgGradient(milestones);
@@ -108,7 +108,7 @@ ColorToning::ColorToning () : FoldableToolPanel(this, "colortoning", M("TP_COLOR
clCurveEditorG->setCurveListener (this);
rtengine::ColorToningParams::getDefaultCLCurve(defaultCurve);
clshape = static_cast<DiagonalCurveEditor*>(clCurveEditorG->addCurve(CT_Diagonal, M("TP_COLORTONING_AB"), irg));
clshape = static_cast<DiagonalCurveEditor*>(clCurveEditorG->addCurve(CT_Diagonal, M("TP_COLORTONING_AB"), irg, false));
clshape->setResetCurve(DiagonalCurveType(defaultCurve.at(0)), defaultCurve);
clshape->setTooltip(M("TP_COLORTONING_CURVEEDITOR_CL_TOOLTIP"));
@@ -128,7 +128,7 @@ ColorToning::ColorToning () : FoldableToolPanel(this, "colortoning", M("TP_COLOR
cl2CurveEditorG->setCurveListener (this);
rtengine::ColorToningParams::getDefaultCL2Curve(defaultCurve);
cl2shape = static_cast<DiagonalCurveEditor*>(cl2CurveEditorG->addCurve(CT_Diagonal, M("TP_COLORTONING_BY"), iby));
cl2shape = static_cast<DiagonalCurveEditor*>(cl2CurveEditorG->addCurve(CT_Diagonal, M("TP_COLORTONING_BY"), iby, false));
cl2shape->setResetCurve(DiagonalCurveType(defaultCurve.at(0)), defaultCurve);
cl2shape->setTooltip(M("TP_COLORTONING_CURVEEDITOR_CL_TOOLTIP"));

View File

@@ -200,6 +200,7 @@ CurveEditor::CurveEditor (Glib::ustring text, CurveEditorGroup* ceGroup, CurveEd
leftBarCP = nullptr;
curveCP = nullptr;
relatedWidget = nullptr;
expandRelatedWidget = true;
group = ceGroup;
subGroup = ceSubGroup;

View File

@@ -66,6 +66,7 @@ protected:
CurveEditorGroup* group;
CurveEditorSubGroup* subGroup;
Gtk::Widget* relatedWidget;
bool expandRelatedWidget;
std::vector<double> tempCurve;
sigc::connection typeconn;

View File

@@ -74,7 +74,7 @@ void CurveEditorGroup::hideCurrentCurve()
* periodic: for FlatCurve only, ask the curve to be periodic (default: True)
*
*/
CurveEditor* CurveEditorGroup::addCurve(CurveType cType, Glib::ustring curveLabel, Gtk::Widget *relatedWidget, bool periodic)
CurveEditor* CurveEditorGroup::addCurve(CurveType cType, Glib::ustring curveLabel, Gtk::Widget *relatedWidget, bool expandRelatedWidget, bool periodic)
{
switch (cType) {
case (CT_Diagonal): {
@@ -85,6 +85,7 @@ CurveEditor* CurveEditorGroup::addCurve(CurveType cType, Glib::ustring curveLabe
// We add it to the curve editor list
DiagonalCurveEditor* newCE = diagonalSubGroup->addCurve(curveLabel);
newCE->relatedWidget = relatedWidget;
newCE->expandRelatedWidget = expandRelatedWidget;
curveEditors.push_back(newCE);
return (newCE);
}
@@ -97,6 +98,7 @@ CurveEditor* CurveEditorGroup::addCurve(CurveType cType, Glib::ustring curveLabe
// We add it to the curve editor list
FlatCurveEditor* newCE = flatSubGroup->addCurve(curveLabel, periodic);
newCE->relatedWidget = relatedWidget;
newCE->expandRelatedWidget = expandRelatedWidget;
curveEditors.push_back(newCE);
return (newCE);
}
@@ -127,10 +129,20 @@ void CurveEditorGroup::newLine()
currLine->attach(*curveGroupLabel, x++, 0, 1, 1);
}
bool rwe = false;
for (int i = numberOfPackedCurve; i < (int)(curveEditors.size()); ++i) {
if (curveEditors[i]->relatedWidget != nullptr && curveEditors[i]->expandRelatedWidget) {
rwe = true;
}
}
for (int i = numberOfPackedCurve; i < (int)(curveEditors.size()); ++i) {
setExpandAlignProperties(curveEditors[i]->curveType->buttonGroup, !rwe, true, Gtk::ALIGN_FILL, Gtk::ALIGN_FILL);
currLine->attach(*curveEditors[i]->curveType->buttonGroup, x++, 0, 1, 1);
if (curveEditors[i]->relatedWidget != nullptr) {
setExpandAlignProperties(curveEditors[i]->relatedWidget, curveEditors[i]->expandRelatedWidget, true, Gtk::ALIGN_FILL, Gtk::ALIGN_FILL);
currLine->attach(*curveEditors[i]->relatedWidget, x++, 0, 1, 1);
}
@@ -139,7 +151,7 @@ void CurveEditorGroup::newLine()
if (isHeader) {
curve_reset = Gtk::manage (new Gtk::Button ());
setExpandAlignProperties(curve_reset, false, false, Gtk::ALIGN_END, Gtk::ALIGN_FILL);
setExpandAlignProperties(curve_reset, false, false, Gtk::ALIGN_CENTER, Gtk::ALIGN_FILL);
curve_reset->add (*Gtk::manage (new RTImage ("gtk-undo-ltr-small.png", "gtk-undo-rtl-small.png")));
curve_reset->set_relief (Gtk::RELIEF_NONE);
curve_reset->set_tooltip_text (M("CURVEEDITOR_TOOLTIPLINEAR"));

View File

@@ -86,7 +86,7 @@ public:
return displayedCurve;
}
//void on_realize ();
CurveEditor* addCurve(CurveType cType, Glib::ustring curveLabel, Gtk::Widget *relatedWidget = nullptr, bool periodic = true);
CurveEditor* addCurve(CurveType cType, Glib::ustring curveLabel, Gtk::Widget *relatedWidget = nullptr, bool expandRelatedWidget = true, bool periodic = true);
void attachCurve (Gtk::Grid* curve);
protected:

View File

@@ -62,7 +62,7 @@ DirPyrDenoise::DirPyrDenoise () : FoldableToolPanel(this, "dirpyrdenoise", M("TP
//curveEditorG = new CurveEditorGroup (options.lastLabCurvesDir);
NoiscurveEditorG->setCurveListener (this);
rtengine::DirPyrDenoiseParams::getDefaultNoisCurve(defaultCurve);
lshape = static_cast<FlatCurveEditor*>(NoiscurveEditorG->addCurve(CT_Flat, "", nullptr, false));
lshape = static_cast<FlatCurveEditor*>(NoiscurveEditorG->addCurve(CT_Flat, "", nullptr, false, false));
lshape->setIdentityValue(0.);
lshape->setResetCurve(FlatCurveType(defaultCurve.at(0)), defaultCurve);
@@ -150,7 +150,7 @@ DirPyrDenoise::DirPyrDenoise () : FoldableToolPanel(this, "dirpyrdenoise", M("TP
CCcurveEditorG = new CurveEditorGroup (options.lastDenoiseCurvesDir, M("TP_DIRPYRDENOISE_CCCURVE"));
CCcurveEditorG->setCurveListener (this);
rtengine::DirPyrDenoiseParams::getDefaultCCCurve(defaultCurve);
ccshape = static_cast<FlatCurveEditor*>(CCcurveEditorG->addCurve(CT_Flat, "", nullptr, false));
ccshape = static_cast<FlatCurveEditor*>(CCcurveEditorG->addCurve(CT_Flat, "", nullptr, false, false));
ccshape->setIdentityValue(0.);
ccshape->setResetCurve(FlatCurveType(defaultCurve.at(0)), defaultCurve);

View File

@@ -591,11 +591,8 @@ MyExpander::MyExpander(bool useEnabled, Gtk::Widget* titleWidget) :
pack_start(*titleEvBox, Gtk::PACK_EXPAND_WIDGET, 0);
//GTK318
#if GTK_MAJOR_VERSION == 3 && GTK_MINOR_VERSION < 20
updateStyle();
#endif
//GTK318
titleEvBox->signal_button_release_event().connect( sigc::mem_fun(this, & MyExpander::on_toggle) );
titleEvBox->signal_enter_notify_event().connect( sigc::mem_fun(this, & MyExpander::on_enter_leave_title), false);
titleEvBox->signal_leave_notify_event().connect( sigc::mem_fun(this, & MyExpander::on_enter_leave_title), false);
@@ -651,11 +648,8 @@ MyExpander::MyExpander(bool useEnabled, Glib::ustring titleLabel) :
pack_start(*titleEvBox, Gtk::PACK_EXPAND_WIDGET, 0);
//GTK318
#if GTK_MAJOR_VERSION == 3 && GTK_MINOR_VERSION < 20
updateStyle();
#endif
//GTK318
titleEvBox->signal_button_release_event().connect( sigc::mem_fun(this, & MyExpander::on_toggle));
titleEvBox->signal_enter_notify_event().connect( sigc::mem_fun(this, & MyExpander::on_enter_leave_title), false);
titleEvBox->signal_leave_notify_event().connect( sigc::mem_fun(this, & MyExpander::on_enter_leave_title), false);
@@ -691,17 +685,28 @@ bool MyExpander::on_enter_leave_enable (GdkEventCrossing* event)
return true;
}
//GTK318
#if GTK_MAJOR_VERSION == 3 && GTK_MINOR_VERSION < 20
void MyExpander::updateStyle()
{
updateVScrollbars(options.hideTPVScrollbar);
//GTK318
#if GTK_MAJOR_VERSION == 3 && GTK_MINOR_VERSION < 20
headerHBox->set_spacing(2);
headerHBox->set_border_width(1);
set_spacing(0);
set_border_width(0);
}
#endif
//GTK318
}
void MyExpander::updateVScrollbars(bool hide)
{
if (hide) {
get_style_context()->remove_class("withScrollbar");
} else {
get_style_context()->add_class("withScrollbar");
}
}
void MyExpander::setLevel (int level)
{

View File

@@ -178,11 +178,8 @@ private:
bool on_enter_leave_title (GdkEventCrossing* event);
/// Used to handle the colored background for the Enable button
bool on_enter_leave_enable (GdkEventCrossing* event);
//GTK318
#if GTK_MAJOR_VERSION == 3 && GTK_MINOR_VERSION < 20
void updateStyle();
#endif
//GTK318
protected:
Gtk::Container* child; /// Gtk::Contained to display below the expander's title
@@ -256,6 +253,8 @@ public:
/// Add a Gtk::Container for the content of the expander
/// Warning: do not manually Show/Hide the widget, because this parameter is handled by the click on the Expander's title
void add (Gtk::Container& widget);
void updateVScrollbars(bool hide);
};

View File

@@ -383,7 +383,7 @@ Retinex::Retinex () : FoldableToolPanel(this, "retinex", M("TP_RETINEX_LABEL"),
setExpandAlignProperties(transmissionCurveEditorG, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START);
transmissionCurveEditorG->setCurveListener (this);
rtengine::RetinexParams::getDefaulttransmissionCurve(defaultCurve);
transmissionShape = static_cast<FlatCurveEditor*>(transmissionCurveEditorG->addCurve(CT_Flat, "", nullptr, false));
transmissionShape = static_cast<FlatCurveEditor*>(transmissionCurveEditorG->addCurve(CT_Flat, "", nullptr, false, false));
transmissionShape->setIdentityValue(0.);
transmissionShape->setResetCurve(FlatCurveType(defaultCurve.at(0)), defaultCurve);
transmissionShape->setBottomBarBgGradient(milestones);
@@ -438,7 +438,7 @@ Retinex::Retinex () : FoldableToolPanel(this, "retinex", M("TP_RETINEX_LABEL"),
setExpandAlignProperties(gaintransmissionCurve, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START);
gaintransmissionCurve->setCurveListener (this);
rtengine::RetinexParams::getDefaultgaintransmissionCurve(defaultCurve);
gaintransmissionShape = static_cast<FlatCurveEditor*>(gaintransmissionCurve->addCurve(CT_Flat, "", nullptr, false));
gaintransmissionShape = static_cast<FlatCurveEditor*>(gaintransmissionCurve->addCurve(CT_Flat, "", nullptr, false, false));
gaintransmissionShape->setIdentityValue(0.);
gaintransmissionShape->setResetCurve(FlatCurveType(defaultCurve.at(0)), defaultCurve);
gaintransmissionShape->setBottomBarBgGradient(milestones);

View File

@@ -133,6 +133,7 @@ RTWindow::RTWindow ()
if (options.windowMaximized) {
maximize();
get_style_context()->add_class("maximized");
} else {
unmaximize();
move(options.windowX, options.windowY);
@@ -385,14 +386,48 @@ void RTWindow::on_realize ()
bool RTWindow::on_window_state_event(GdkEventWindowState* event)
{
const int new_window_state = event->new_window_state & ~GDK_WINDOW_STATE_FOCUSED;
/*
printf("Window state event: %s%s%s%s%s%s%s%s%s\n",
event->new_window_state & GDK_WINDOW_STATE_WITHDRAWN ? "Withdrawn" : "",
event->new_window_state & GDK_WINDOW_STATE_ICONIFIED ? " Iconified" : "",
event->new_window_state & GDK_WINDOW_STATE_MAXIMIZED ? " Maximized" : "",
event->new_window_state & GDK_WINDOW_STATE_STICKY ? " Sticky" : "",
event->new_window_state & GDK_WINDOW_STATE_FULLSCREEN ? " Fullscreen" : "",
event->new_window_state & GDK_WINDOW_STATE_ABOVE ? " Above" : "",
event->new_window_state & GDK_WINDOW_STATE_BELOW ? " Below" : "",
event->new_window_state & GDK_WINDOW_STATE_FOCUSED ? " Focused" : "",
event->new_window_state & GDK_WINDOW_STATE_TILED ? " Tiled" : ""
);
*/
if (!new_window_state) {
// Window mode
options.windowMaximized = false;
} else if (new_window_state & (GDK_WINDOW_STATE_MAXIMIZED | GDK_WINDOW_STATE_FULLSCREEN | GDK_WINDOW_STATE_ICONIFIED)) {
// Fullscreen mode, save this mode even when window is iconified (minimized) to allow easier restore, not the best solution though...
// Return if we get iconified
if (event->new_window_state & GDK_WINDOW_STATE_ICONIFIED) {
return true;
}
// Then looking for evolutions of GDK_WINDOW_STATE_FULLSCREEN & GDK_WINDOW_STATE_MAXIMIZED only
bool isFullScreen = event->new_window_state & GDK_WINDOW_STATE_FULLSCREEN;
bool isMaximized = event->new_window_state & GDK_WINDOW_STATE_MAXIMIZED;
bool switchFullScreen = event->changed_mask & GDK_WINDOW_STATE_FULLSCREEN;
bool switchMaximized = event->changed_mask & GDK_WINDOW_STATE_MAXIMIZED;
if (switchFullScreen) {
// Fullscreen mode
if (isFullScreen) {
get_style_context()->add_class("fullscreen");
} else {
get_style_context()->remove_class("fullscreen");
}
}
if (switchMaximized) {
// Maximized mode
if (isMaximized) {
options.windowMaximized = true;
get_style_context()->add_class("maximized");
} else {
options.windowMaximized = false;
get_style_context()->remove_class("maximized");
}
}
return true;

View File

@@ -831,6 +831,10 @@ void ToolPanelCoordinator::updateVScrollbars (bool hide)
transformPanelSW->set_policy (Gtk::POLICY_AUTOMATIC, policy);
rawPanelSW->set_policy (Gtk::POLICY_AUTOMATIC, policy);
waveletPanelSW->set_policy (Gtk::POLICY_AUTOMATIC, policy);
for (auto currExp : expList) {
currExp->updateVScrollbars(hide);
}
}
void ToolPanelCoordinator::updateTabsHeader (bool useIcons)

View File

@@ -365,7 +365,7 @@ Wavelet::Wavelet () : FoldableToolPanel(this, "wavelet", M("TP_WAVELET_LABEL"),
opaCurveEditorG->setCurveListener (this);
rtengine::WaveletParams::getDefaultOpacityCurveRG(defaultCurve);
opacityShapeRG = static_cast<FlatCurveEditor*>(opaCurveEditorG->addCurve(CT_Flat, "", nullptr, false));
opacityShapeRG = static_cast<FlatCurveEditor*>(opaCurveEditorG->addCurve(CT_Flat, "", nullptr, false, false));
opacityShapeRG->setIdentityValue(0.);
opacityShapeRG->setResetCurve(FlatCurveType(defaultCurve.at(0)), defaultCurve);
@@ -378,7 +378,7 @@ Wavelet::Wavelet () : FoldableToolPanel(this, "wavelet", M("TP_WAVELET_LABEL"),
opacityCurveEditorG->setCurveListener (this);
rtengine::WaveletParams::getDefaultOpacityCurveBY(defaultCurve);
opacityShapeBY = static_cast<FlatCurveEditor*>(opacityCurveEditorG->addCurve(CT_Flat, "", nullptr, false));
opacityShapeBY = static_cast<FlatCurveEditor*>(opacityCurveEditorG->addCurve(CT_Flat, "", nullptr, false, false));
opacityShapeBY->setIdentityValue(0.);
opacityShapeBY->setResetCurve(FlatCurveType(defaultCurve.at(0)), defaultCurve);
@@ -474,7 +474,7 @@ Wavelet::Wavelet () : FoldableToolPanel(this, "wavelet", M("TP_WAVELET_LABEL"),
CCWcurveEditorG->setCurveListener (this);
rtengine::WaveletParams::getDefaultCCWCurve(defaultCurve);
ccshape = static_cast<FlatCurveEditor*>(CCWcurveEditorG->addCurve(CT_Flat, "", nullptr, false));
ccshape = static_cast<FlatCurveEditor*>(CCWcurveEditorG->addCurve(CT_Flat, "", nullptr, false, false));
ccshape->setIdentityValue(0.);
ccshape->setResetCurve(FlatCurveType(defaultCurve.at(0)), defaultCurve);
@@ -794,7 +794,7 @@ Wavelet::Wavelet () : FoldableToolPanel(this, "wavelet", M("TP_WAVELET_LABEL"),
opacityCurveEditorW->setCurveListener (this);
rtengine::WaveletParams::getDefaultOpacityCurveW(defaultCurve);
opacityShape = static_cast<FlatCurveEditor*>(opacityCurveEditorW->addCurve(CT_Flat, "", nullptr, false));
opacityShape = static_cast<FlatCurveEditor*>(opacityCurveEditorW->addCurve(CT_Flat, "", nullptr, false, false));
opacityShape->setIdentityValue(0.);
opacityShape->setResetCurve(FlatCurveType(defaultCurve.at(0)), defaultCurve);
opacityShape->setBottomBarBgGradient(milestonesW);
@@ -813,7 +813,7 @@ Wavelet::Wavelet () : FoldableToolPanel(this, "wavelet", M("TP_WAVELET_LABEL"),
opacityCurveEditorWL->setCurveListener (this);
rtengine::WaveletParams::getDefaultOpacityCurveWL(defaultCurve);
opacityShapeWL = static_cast<FlatCurveEditor*>(opacityCurveEditorWL->addCurve(CT_Flat, "", nullptr, false));
opacityShapeWL = static_cast<FlatCurveEditor*>(opacityCurveEditorWL->addCurve(CT_Flat, "", nullptr, false, false));
opacityShapeWL->setIdentityValue(0.);
opacityShapeWL->setResetCurve(FlatCurveType(defaultCurve.at(0)), defaultCurve);
opacityShapeWL->setTooltip(M("TP_WAVELET_OPACITYWL_TOOLTIP"));

View File

@@ -151,6 +151,7 @@ WhiteBalance::WhiteBalance () : FoldableToolPanel(this, "whitebalance", M("TP_WB
{
Gtk::HBox* hbox = Gtk::manage (new Gtk::HBox ());
hbox->set_spacing(4);
hbox->show ();
Gtk::Label* lab = Gtk::manage (new Gtk::Label (M("TP_WBALANCE_METHOD")));
lab->show ();
@@ -238,14 +239,19 @@ WhiteBalance::WhiteBalance () : FoldableToolPanel(this, "whitebalance", M("TP_WB
method->pack_start(methodColumns.colIcon, false);
method->pack_start(methodColumns.colLabel, true);
std::vector<Gtk::CellRenderer*> cells = method->get_cells();
Gtk::CellRendererText* cellRenderer = dynamic_cast<Gtk::CellRendererText*>(cells.at(1));
cellRenderer->property_ellipsize() = Pango::ELLIPSIZE_MIDDLE;
method->set_active (0); // Camera
method->show ();
hbox->pack_start (*lab, Gtk::PACK_SHRINK, 4);
hbox->pack_start (*lab, Gtk::PACK_SHRINK, 0);
hbox->pack_start (*method);
pack_start (*hbox, Gtk::PACK_SHRINK, 4);
pack_start (*hbox, Gtk::PACK_SHRINK, 0);
opt = 0;
Gtk::HBox* spotbox = Gtk::manage (new Gtk::HBox ());
spotbox->set_spacing(4);
spotbox->show ();
spotbutton = Gtk::manage (new Gtk::Button ());
@@ -292,10 +298,10 @@ WhiteBalance::WhiteBalance () : FoldableToolPanel(this, "whitebalance", M("TP_WB
spotsize->set_active(4);
}
spotbox->pack_end (*spotsize, Gtk::PACK_EXPAND_WIDGET, 4);
spotbox->pack_end (*slab, Gtk::PACK_SHRINK, 4);
spotbox->pack_end (*spotsize, Gtk::PACK_EXPAND_WIDGET, 0);
spotbox->pack_end (*slab, Gtk::PACK_SHRINK, 0);
pack_start (*spotbox, Gtk::PACK_SHRINK, 4);
pack_start (*spotbox, Gtk::PACK_SHRINK, 0);
Gtk::Image* itempL = Gtk::manage (new RTImage ("ajd-wb-temp1.png"));
Gtk::Image* itempR = Gtk::manage (new RTImage ("ajd-wb-temp2.png"));