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:
@@ -55,6 +55,12 @@ headerbar {
|
|||||||
background-image: none;
|
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 {
|
window > decoration, dialog > decoration {
|
||||||
box-shadow: none;
|
box-shadow: none;
|
||||||
margin: 0px;
|
margin: 0px;
|
||||||
@@ -169,25 +175,20 @@ button {
|
|||||||
button.flat {
|
button.flat {
|
||||||
background-image: none;
|
background-image: none;
|
||||||
}
|
}
|
||||||
button.popupbutton-arrow {
|
button.flat:checked {
|
||||||
min-width: 18px;
|
background-image: linear-gradient(#343434, #2E2E2E, #292929);
|
||||||
}
|
|
||||||
|
|
||||||
button:hover {
|
|
||||||
background-image: linear-gradient(#444444, #3E3E3E, #393939);
|
|
||||||
}
|
}
|
||||||
checkbutton > check {
|
checkbutton > check {
|
||||||
background-image: linear-gradient(#343434, #2E2E2E, #292929);
|
background-image: linear-gradient(#343434, #2E2E2E, #292929);
|
||||||
|
|
||||||
}
|
|
||||||
checkbutton:hover > check {
|
|
||||||
background-image: linear-gradient(#444444, #3E3E3E, #393939);
|
|
||||||
}
|
}
|
||||||
radiobutton > radio {
|
radiobutton > radio {
|
||||||
background-image: linear-gradient(#343434, #2E2E2E, #292929);
|
background-image: linear-gradient(#343434, #2E2E2E, #292929);
|
||||||
}
|
}
|
||||||
radiobutton:hover > radio {
|
button:hover , button.flat:hover, checkbutton:hover > check, radiobutton:hover > radio {
|
||||||
background-image: linear-gradient(#444444, #3E3E3E, #393939);
|
background-image: linear-gradient(shade(#343434,1.3), shade(#2E2E2E,1.3), shade(#292929,1.3));
|
||||||
|
}
|
||||||
|
button.popupbutton-arrow {
|
||||||
|
min-width: 18px;
|
||||||
}
|
}
|
||||||
|
|
||||||
combobox {
|
combobox {
|
||||||
@@ -337,6 +338,10 @@ entry, spinbutton {
|
|||||||
background-color: #262626;
|
background-color: #262626;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
spinbutton entry {
|
||||||
|
padding-right: 6px;
|
||||||
|
}
|
||||||
|
|
||||||
entry:disabled, spinbutton:disabled {
|
entry:disabled, spinbutton:disabled {
|
||||||
background-color: #363636;
|
background-color: #363636;
|
||||||
}
|
}
|
||||||
@@ -372,6 +377,9 @@ menuitem {
|
|||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
|
#MyExpander.withScrollbar {
|
||||||
|
margin-right: 6px;
|
||||||
|
}
|
||||||
|
|
||||||
/* Tool background */
|
/* Tool background */
|
||||||
#ExpanderBox > box, #ExpanderBox > grid {
|
#ExpanderBox > box, #ExpanderBox > grid {
|
||||||
@@ -476,8 +484,8 @@ menuitem {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#MyExpanderTitle > box {
|
#MyExpanderTitle > box {
|
||||||
margin: 2px 0 2px 0;
|
margin: 2px 0;
|
||||||
padding: 2px;
|
padding: 2px 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#MyExpanderTitle label {
|
#MyExpanderTitle label {
|
||||||
@@ -798,7 +806,7 @@ paned.vertical > separator {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#RightNotebook #ToolPanelNotebook stack {
|
#RightNotebook #ToolPanelNotebook stack {
|
||||||
margin: 4px;
|
margin: 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#RightNotebook #HistoryPanel {
|
#RightNotebook #HistoryPanel {
|
||||||
|
@@ -40,7 +40,7 @@ ColorToning::ColorToning () : FoldableToolPanel(this, "colortoning", M("TP_COLOR
|
|||||||
colorCurveEditorG = new CurveEditorGroup (options.lastColorToningCurvesDir, M("TP_COLORTONING_COLOR"));
|
colorCurveEditorG = new CurveEditorGroup (options.lastColorToningCurvesDir, M("TP_COLORTONING_COLOR"));
|
||||||
colorCurveEditorG->setCurveListener (this);
|
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);
|
colorShape->setCurveColorProvider(this, 1);
|
||||||
std::vector<GradientMilestone> milestones;
|
std::vector<GradientMilestone> milestones;
|
||||||
|
|
||||||
@@ -89,7 +89,7 @@ ColorToning::ColorToning () : FoldableToolPanel(this, "colortoning", M("TP_COLOR
|
|||||||
opacityCurveEditorG->setCurveListener (this);
|
opacityCurveEditorG->setCurveListener (this);
|
||||||
|
|
||||||
rtengine::ColorToningParams::getDefaultOpacityCurve(defaultCurve);
|
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->setIdentityValue(0.);
|
||||||
opacityShape->setResetCurve(FlatCurveType(defaultCurve.at(0)), defaultCurve);
|
opacityShape->setResetCurve(FlatCurveType(defaultCurve.at(0)), defaultCurve);
|
||||||
opacityShape->setBottomBarBgGradient(milestones);
|
opacityShape->setBottomBarBgGradient(milestones);
|
||||||
@@ -108,7 +108,7 @@ ColorToning::ColorToning () : FoldableToolPanel(this, "colortoning", M("TP_COLOR
|
|||||||
clCurveEditorG->setCurveListener (this);
|
clCurveEditorG->setCurveListener (this);
|
||||||
|
|
||||||
rtengine::ColorToningParams::getDefaultCLCurve(defaultCurve);
|
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->setResetCurve(DiagonalCurveType(defaultCurve.at(0)), defaultCurve);
|
||||||
clshape->setTooltip(M("TP_COLORTONING_CURVEEDITOR_CL_TOOLTIP"));
|
clshape->setTooltip(M("TP_COLORTONING_CURVEEDITOR_CL_TOOLTIP"));
|
||||||
|
|
||||||
@@ -128,7 +128,7 @@ ColorToning::ColorToning () : FoldableToolPanel(this, "colortoning", M("TP_COLOR
|
|||||||
cl2CurveEditorG->setCurveListener (this);
|
cl2CurveEditorG->setCurveListener (this);
|
||||||
|
|
||||||
rtengine::ColorToningParams::getDefaultCL2Curve(defaultCurve);
|
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->setResetCurve(DiagonalCurveType(defaultCurve.at(0)), defaultCurve);
|
||||||
cl2shape->setTooltip(M("TP_COLORTONING_CURVEEDITOR_CL_TOOLTIP"));
|
cl2shape->setTooltip(M("TP_COLORTONING_CURVEEDITOR_CL_TOOLTIP"));
|
||||||
|
|
||||||
|
@@ -200,6 +200,7 @@ CurveEditor::CurveEditor (Glib::ustring text, CurveEditorGroup* ceGroup, CurveEd
|
|||||||
leftBarCP = nullptr;
|
leftBarCP = nullptr;
|
||||||
curveCP = nullptr;
|
curveCP = nullptr;
|
||||||
relatedWidget = nullptr;
|
relatedWidget = nullptr;
|
||||||
|
expandRelatedWidget = true;
|
||||||
|
|
||||||
group = ceGroup;
|
group = ceGroup;
|
||||||
subGroup = ceSubGroup;
|
subGroup = ceSubGroup;
|
||||||
|
@@ -66,6 +66,7 @@ protected:
|
|||||||
CurveEditorGroup* group;
|
CurveEditorGroup* group;
|
||||||
CurveEditorSubGroup* subGroup;
|
CurveEditorSubGroup* subGroup;
|
||||||
Gtk::Widget* relatedWidget;
|
Gtk::Widget* relatedWidget;
|
||||||
|
bool expandRelatedWidget;
|
||||||
|
|
||||||
std::vector<double> tempCurve;
|
std::vector<double> tempCurve;
|
||||||
sigc::connection typeconn;
|
sigc::connection typeconn;
|
||||||
|
@@ -74,7 +74,7 @@ void CurveEditorGroup::hideCurrentCurve()
|
|||||||
* periodic: for FlatCurve only, ask the curve to be periodic (default: True)
|
* 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) {
|
switch (cType) {
|
||||||
case (CT_Diagonal): {
|
case (CT_Diagonal): {
|
||||||
@@ -85,6 +85,7 @@ CurveEditor* CurveEditorGroup::addCurve(CurveType cType, Glib::ustring curveLabe
|
|||||||
// We add it to the curve editor list
|
// We add it to the curve editor list
|
||||||
DiagonalCurveEditor* newCE = diagonalSubGroup->addCurve(curveLabel);
|
DiagonalCurveEditor* newCE = diagonalSubGroup->addCurve(curveLabel);
|
||||||
newCE->relatedWidget = relatedWidget;
|
newCE->relatedWidget = relatedWidget;
|
||||||
|
newCE->expandRelatedWidget = expandRelatedWidget;
|
||||||
curveEditors.push_back(newCE);
|
curveEditors.push_back(newCE);
|
||||||
return (newCE);
|
return (newCE);
|
||||||
}
|
}
|
||||||
@@ -97,6 +98,7 @@ CurveEditor* CurveEditorGroup::addCurve(CurveType cType, Glib::ustring curveLabe
|
|||||||
// We add it to the curve editor list
|
// We add it to the curve editor list
|
||||||
FlatCurveEditor* newCE = flatSubGroup->addCurve(curveLabel, periodic);
|
FlatCurveEditor* newCE = flatSubGroup->addCurve(curveLabel, periodic);
|
||||||
newCE->relatedWidget = relatedWidget;
|
newCE->relatedWidget = relatedWidget;
|
||||||
|
newCE->expandRelatedWidget = expandRelatedWidget;
|
||||||
curveEditors.push_back(newCE);
|
curveEditors.push_back(newCE);
|
||||||
return (newCE);
|
return (newCE);
|
||||||
}
|
}
|
||||||
@@ -127,10 +129,20 @@ void CurveEditorGroup::newLine()
|
|||||||
currLine->attach(*curveGroupLabel, x++, 0, 1, 1);
|
currLine->attach(*curveGroupLabel, x++, 0, 1, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool rwe = false;
|
||||||
|
|
||||||
for (int i = numberOfPackedCurve; i < (int)(curveEditors.size()); ++i) {
|
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);
|
currLine->attach(*curveEditors[i]->curveType->buttonGroup, x++, 0, 1, 1);
|
||||||
|
|
||||||
if (curveEditors[i]->relatedWidget != nullptr) {
|
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);
|
currLine->attach(*curveEditors[i]->relatedWidget, x++, 0, 1, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -139,7 +151,7 @@ void CurveEditorGroup::newLine()
|
|||||||
|
|
||||||
if (isHeader) {
|
if (isHeader) {
|
||||||
curve_reset = Gtk::manage (new Gtk::Button ());
|
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->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_relief (Gtk::RELIEF_NONE);
|
||||||
curve_reset->set_tooltip_text (M("CURVEEDITOR_TOOLTIPLINEAR"));
|
curve_reset->set_tooltip_text (M("CURVEEDITOR_TOOLTIPLINEAR"));
|
||||||
|
@@ -86,7 +86,7 @@ public:
|
|||||||
return displayedCurve;
|
return displayedCurve;
|
||||||
}
|
}
|
||||||
//void on_realize ();
|
//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);
|
void attachCurve (Gtk::Grid* curve);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
@@ -62,7 +62,7 @@ DirPyrDenoise::DirPyrDenoise () : FoldableToolPanel(this, "dirpyrdenoise", M("TP
|
|||||||
//curveEditorG = new CurveEditorGroup (options.lastLabCurvesDir);
|
//curveEditorG = new CurveEditorGroup (options.lastLabCurvesDir);
|
||||||
NoiscurveEditorG->setCurveListener (this);
|
NoiscurveEditorG->setCurveListener (this);
|
||||||
rtengine::DirPyrDenoiseParams::getDefaultNoisCurve(defaultCurve);
|
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->setIdentityValue(0.);
|
||||||
lshape->setResetCurve(FlatCurveType(defaultCurve.at(0)), defaultCurve);
|
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 = new CurveEditorGroup (options.lastDenoiseCurvesDir, M("TP_DIRPYRDENOISE_CCCURVE"));
|
||||||
CCcurveEditorG->setCurveListener (this);
|
CCcurveEditorG->setCurveListener (this);
|
||||||
rtengine::DirPyrDenoiseParams::getDefaultCCCurve(defaultCurve);
|
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->setIdentityValue(0.);
|
||||||
ccshape->setResetCurve(FlatCurveType(defaultCurve.at(0)), defaultCurve);
|
ccshape->setResetCurve(FlatCurveType(defaultCurve.at(0)), defaultCurve);
|
||||||
|
|
||||||
|
@@ -591,11 +591,8 @@ MyExpander::MyExpander(bool useEnabled, Gtk::Widget* titleWidget) :
|
|||||||
|
|
||||||
pack_start(*titleEvBox, Gtk::PACK_EXPAND_WIDGET, 0);
|
pack_start(*titleEvBox, Gtk::PACK_EXPAND_WIDGET, 0);
|
||||||
|
|
||||||
//GTK318
|
|
||||||
#if GTK_MAJOR_VERSION == 3 && GTK_MINOR_VERSION < 20
|
|
||||||
updateStyle();
|
updateStyle();
|
||||||
#endif
|
|
||||||
//GTK318
|
|
||||||
titleEvBox->signal_button_release_event().connect( sigc::mem_fun(this, & MyExpander::on_toggle) );
|
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_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);
|
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);
|
pack_start(*titleEvBox, Gtk::PACK_EXPAND_WIDGET, 0);
|
||||||
|
|
||||||
//GTK318
|
|
||||||
#if GTK_MAJOR_VERSION == 3 && GTK_MINOR_VERSION < 20
|
|
||||||
updateStyle();
|
updateStyle();
|
||||||
#endif
|
|
||||||
//GTK318
|
|
||||||
titleEvBox->signal_button_release_event().connect( sigc::mem_fun(this, & MyExpander::on_toggle));
|
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_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);
|
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;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
//GTK318
|
|
||||||
#if GTK_MAJOR_VERSION == 3 && GTK_MINOR_VERSION < 20
|
|
||||||
void MyExpander::updateStyle()
|
void MyExpander::updateStyle()
|
||||||
{
|
{
|
||||||
|
updateVScrollbars(options.hideTPVScrollbar);
|
||||||
|
|
||||||
|
//GTK318
|
||||||
|
#if GTK_MAJOR_VERSION == 3 && GTK_MINOR_VERSION < 20
|
||||||
headerHBox->set_spacing(2);
|
headerHBox->set_spacing(2);
|
||||||
headerHBox->set_border_width(1);
|
headerHBox->set_border_width(1);
|
||||||
set_spacing(0);
|
set_spacing(0);
|
||||||
set_border_width(0);
|
set_border_width(0);
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
//GTK318
|
//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)
|
void MyExpander::setLevel (int level)
|
||||||
{
|
{
|
||||||
|
@@ -178,11 +178,8 @@ private:
|
|||||||
bool on_enter_leave_title (GdkEventCrossing* event);
|
bool on_enter_leave_title (GdkEventCrossing* event);
|
||||||
/// Used to handle the colored background for the Enable button
|
/// Used to handle the colored background for the Enable button
|
||||||
bool on_enter_leave_enable (GdkEventCrossing* event);
|
bool on_enter_leave_enable (GdkEventCrossing* event);
|
||||||
//GTK318
|
|
||||||
#if GTK_MAJOR_VERSION == 3 && GTK_MINOR_VERSION < 20
|
|
||||||
void updateStyle();
|
void updateStyle();
|
||||||
#endif
|
|
||||||
//GTK318
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
Gtk::Container* child; /// Gtk::Contained to display below the expander's title
|
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
|
/// 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
|
/// 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 add (Gtk::Container& widget);
|
||||||
|
|
||||||
|
void updateVScrollbars(bool hide);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@@ -383,7 +383,7 @@ Retinex::Retinex () : FoldableToolPanel(this, "retinex", M("TP_RETINEX_LABEL"),
|
|||||||
setExpandAlignProperties(transmissionCurveEditorG, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START);
|
setExpandAlignProperties(transmissionCurveEditorG, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START);
|
||||||
transmissionCurveEditorG->setCurveListener (this);
|
transmissionCurveEditorG->setCurveListener (this);
|
||||||
rtengine::RetinexParams::getDefaulttransmissionCurve(defaultCurve);
|
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->setIdentityValue(0.);
|
||||||
transmissionShape->setResetCurve(FlatCurveType(defaultCurve.at(0)), defaultCurve);
|
transmissionShape->setResetCurve(FlatCurveType(defaultCurve.at(0)), defaultCurve);
|
||||||
transmissionShape->setBottomBarBgGradient(milestones);
|
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);
|
setExpandAlignProperties(gaintransmissionCurve, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START);
|
||||||
gaintransmissionCurve->setCurveListener (this);
|
gaintransmissionCurve->setCurveListener (this);
|
||||||
rtengine::RetinexParams::getDefaultgaintransmissionCurve(defaultCurve);
|
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->setIdentityValue(0.);
|
||||||
gaintransmissionShape->setResetCurve(FlatCurveType(defaultCurve.at(0)), defaultCurve);
|
gaintransmissionShape->setResetCurve(FlatCurveType(defaultCurve.at(0)), defaultCurve);
|
||||||
gaintransmissionShape->setBottomBarBgGradient(milestones);
|
gaintransmissionShape->setBottomBarBgGradient(milestones);
|
||||||
|
@@ -133,6 +133,7 @@ RTWindow::RTWindow ()
|
|||||||
|
|
||||||
if (options.windowMaximized) {
|
if (options.windowMaximized) {
|
||||||
maximize();
|
maximize();
|
||||||
|
get_style_context()->add_class("maximized");
|
||||||
} else {
|
} else {
|
||||||
unmaximize();
|
unmaximize();
|
||||||
move(options.windowX, options.windowY);
|
move(options.windowX, options.windowY);
|
||||||
@@ -385,14 +386,48 @@ void RTWindow::on_realize ()
|
|||||||
|
|
||||||
bool RTWindow::on_window_state_event(GdkEventWindowState* event)
|
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) {
|
// Return if we get iconified
|
||||||
// Window mode
|
if (event->new_window_state & GDK_WINDOW_STATE_ICONIFIED) {
|
||||||
options.windowMaximized = false;
|
return true;
|
||||||
} 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...
|
|
||||||
options.windowMaximized = 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;
|
return true;
|
||||||
|
@@ -831,6 +831,10 @@ void ToolPanelCoordinator::updateVScrollbars (bool hide)
|
|||||||
transformPanelSW->set_policy (Gtk::POLICY_AUTOMATIC, policy);
|
transformPanelSW->set_policy (Gtk::POLICY_AUTOMATIC, policy);
|
||||||
rawPanelSW->set_policy (Gtk::POLICY_AUTOMATIC, policy);
|
rawPanelSW->set_policy (Gtk::POLICY_AUTOMATIC, policy);
|
||||||
waveletPanelSW->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)
|
void ToolPanelCoordinator::updateTabsHeader (bool useIcons)
|
||||||
|
@@ -365,7 +365,7 @@ Wavelet::Wavelet () : FoldableToolPanel(this, "wavelet", M("TP_WAVELET_LABEL"),
|
|||||||
opaCurveEditorG->setCurveListener (this);
|
opaCurveEditorG->setCurveListener (this);
|
||||||
|
|
||||||
rtengine::WaveletParams::getDefaultOpacityCurveRG(defaultCurve);
|
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->setIdentityValue(0.);
|
||||||
opacityShapeRG->setResetCurve(FlatCurveType(defaultCurve.at(0)), defaultCurve);
|
opacityShapeRG->setResetCurve(FlatCurveType(defaultCurve.at(0)), defaultCurve);
|
||||||
|
|
||||||
@@ -378,7 +378,7 @@ Wavelet::Wavelet () : FoldableToolPanel(this, "wavelet", M("TP_WAVELET_LABEL"),
|
|||||||
opacityCurveEditorG->setCurveListener (this);
|
opacityCurveEditorG->setCurveListener (this);
|
||||||
|
|
||||||
rtengine::WaveletParams::getDefaultOpacityCurveBY(defaultCurve);
|
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->setIdentityValue(0.);
|
||||||
opacityShapeBY->setResetCurve(FlatCurveType(defaultCurve.at(0)), defaultCurve);
|
opacityShapeBY->setResetCurve(FlatCurveType(defaultCurve.at(0)), defaultCurve);
|
||||||
|
|
||||||
@@ -474,7 +474,7 @@ Wavelet::Wavelet () : FoldableToolPanel(this, "wavelet", M("TP_WAVELET_LABEL"),
|
|||||||
CCWcurveEditorG->setCurveListener (this);
|
CCWcurveEditorG->setCurveListener (this);
|
||||||
|
|
||||||
rtengine::WaveletParams::getDefaultCCWCurve(defaultCurve);
|
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->setIdentityValue(0.);
|
||||||
ccshape->setResetCurve(FlatCurveType(defaultCurve.at(0)), defaultCurve);
|
ccshape->setResetCurve(FlatCurveType(defaultCurve.at(0)), defaultCurve);
|
||||||
@@ -794,7 +794,7 @@ Wavelet::Wavelet () : FoldableToolPanel(this, "wavelet", M("TP_WAVELET_LABEL"),
|
|||||||
opacityCurveEditorW->setCurveListener (this);
|
opacityCurveEditorW->setCurveListener (this);
|
||||||
|
|
||||||
rtengine::WaveletParams::getDefaultOpacityCurveW(defaultCurve);
|
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->setIdentityValue(0.);
|
||||||
opacityShape->setResetCurve(FlatCurveType(defaultCurve.at(0)), defaultCurve);
|
opacityShape->setResetCurve(FlatCurveType(defaultCurve.at(0)), defaultCurve);
|
||||||
opacityShape->setBottomBarBgGradient(milestonesW);
|
opacityShape->setBottomBarBgGradient(milestonesW);
|
||||||
@@ -813,7 +813,7 @@ Wavelet::Wavelet () : FoldableToolPanel(this, "wavelet", M("TP_WAVELET_LABEL"),
|
|||||||
opacityCurveEditorWL->setCurveListener (this);
|
opacityCurveEditorWL->setCurveListener (this);
|
||||||
|
|
||||||
rtengine::WaveletParams::getDefaultOpacityCurveWL(defaultCurve);
|
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->setIdentityValue(0.);
|
||||||
opacityShapeWL->setResetCurve(FlatCurveType(defaultCurve.at(0)), defaultCurve);
|
opacityShapeWL->setResetCurve(FlatCurveType(defaultCurve.at(0)), defaultCurve);
|
||||||
opacityShapeWL->setTooltip(M("TP_WAVELET_OPACITYWL_TOOLTIP"));
|
opacityShapeWL->setTooltip(M("TP_WAVELET_OPACITYWL_TOOLTIP"));
|
||||||
|
@@ -151,6 +151,7 @@ WhiteBalance::WhiteBalance () : FoldableToolPanel(this, "whitebalance", M("TP_WB
|
|||||||
{
|
{
|
||||||
|
|
||||||
Gtk::HBox* hbox = Gtk::manage (new Gtk::HBox ());
|
Gtk::HBox* hbox = Gtk::manage (new Gtk::HBox ());
|
||||||
|
hbox->set_spacing(4);
|
||||||
hbox->show ();
|
hbox->show ();
|
||||||
Gtk::Label* lab = Gtk::manage (new Gtk::Label (M("TP_WBALANCE_METHOD")));
|
Gtk::Label* lab = Gtk::manage (new Gtk::Label (M("TP_WBALANCE_METHOD")));
|
||||||
lab->show ();
|
lab->show ();
|
||||||
@@ -238,14 +239,19 @@ WhiteBalance::WhiteBalance () : FoldableToolPanel(this, "whitebalance", M("TP_WB
|
|||||||
method->pack_start(methodColumns.colIcon, false);
|
method->pack_start(methodColumns.colIcon, false);
|
||||||
method->pack_start(methodColumns.colLabel, true);
|
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->set_active (0); // Camera
|
||||||
method->show ();
|
method->show ();
|
||||||
hbox->pack_start (*lab, Gtk::PACK_SHRINK, 4);
|
hbox->pack_start (*lab, Gtk::PACK_SHRINK, 0);
|
||||||
hbox->pack_start (*method);
|
hbox->pack_start (*method);
|
||||||
pack_start (*hbox, Gtk::PACK_SHRINK, 4);
|
pack_start (*hbox, Gtk::PACK_SHRINK, 0);
|
||||||
opt = 0;
|
opt = 0;
|
||||||
|
|
||||||
Gtk::HBox* spotbox = Gtk::manage (new Gtk::HBox ());
|
Gtk::HBox* spotbox = Gtk::manage (new Gtk::HBox ());
|
||||||
|
spotbox->set_spacing(4);
|
||||||
spotbox->show ();
|
spotbox->show ();
|
||||||
|
|
||||||
spotbutton = Gtk::manage (new Gtk::Button ());
|
spotbutton = Gtk::manage (new Gtk::Button ());
|
||||||
@@ -292,10 +298,10 @@ WhiteBalance::WhiteBalance () : FoldableToolPanel(this, "whitebalance", M("TP_WB
|
|||||||
spotsize->set_active(4);
|
spotsize->set_active(4);
|
||||||
}
|
}
|
||||||
|
|
||||||
spotbox->pack_end (*spotsize, Gtk::PACK_EXPAND_WIDGET, 4);
|
spotbox->pack_end (*spotsize, Gtk::PACK_EXPAND_WIDGET, 0);
|
||||||
spotbox->pack_end (*slab, Gtk::PACK_SHRINK, 4);
|
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* itempL = Gtk::manage (new RTImage ("ajd-wb-temp1.png"));
|
||||||
Gtk::Image* itempR = Gtk::manage (new RTImage ("ajd-wb-temp2.png"));
|
Gtk::Image* itempR = Gtk::manage (new RTImage ("ajd-wb-temp2.png"));
|
||||||
|
Reference in New Issue
Block a user