Moved focus mask preview to clipped shadows/highlights section, uses large focus-screem icon, #4027
This commit is contained in:
@@ -1361,13 +1361,13 @@ void CropWindow::expose (Cairo::RefPtr<Cairo::Context> cr)
|
||||
imgH = cropHandler.cropPixbuf->get_height ();
|
||||
exposeVersion++;
|
||||
|
||||
bool showcs = iarea->indClippedPanel->showClippedShadows();
|
||||
bool showch = iarea->indClippedPanel->showClippedHighlights();
|
||||
const bool showR = iarea->previewModePanel->showR(); // will show clipping if R channel is clipped
|
||||
const bool showG = iarea->previewModePanel->showG(); // will show clipping if G channel is clipped
|
||||
const bool showB = iarea->previewModePanel->showB(); // will show clipping if B channel is clipped
|
||||
const bool showL = iarea->previewModePanel->showL(); // will show clipping if L value is clipped
|
||||
const bool showFocusMask = iarea->previewModePanel->showFocusMask();
|
||||
const bool showFocusMask = iarea->indClippedPanel->showFocusMask();
|
||||
bool showcs = iarea->indClippedPanel->showClippedShadows();
|
||||
bool showch = iarea->indClippedPanel->showClippedHighlights();
|
||||
|
||||
// While the Right-side ALT is pressed, auto-enable highlight and shadow clipping indicators
|
||||
// TODO: Add linux/MacOS specific functions for alternative
|
||||
|
@@ -1539,11 +1539,7 @@ bool EditorPanel::handleShortcutKey (GdkEventKey* event)
|
||||
return true;
|
||||
|
||||
case GDK_KEY_F: //preview mode Focus Mask
|
||||
iareapanel->imageArea->previewModePanel->toggleFocusMask();
|
||||
return true;
|
||||
|
||||
case GDK_KEY_f:
|
||||
iareapanel->imageArea->zoomPanel->zoomFitClicked();
|
||||
iareapanel->imageArea->indClippedPanel->toggleFocusMask();
|
||||
return true;
|
||||
|
||||
case GDK_KEY_less:
|
||||
@@ -1554,6 +1550,10 @@ bool EditorPanel::handleShortcutKey (GdkEventKey* event)
|
||||
iareapanel->imageArea->indClippedPanel->toggleClipped (true);
|
||||
return true;
|
||||
|
||||
case GDK_KEY_f:
|
||||
iareapanel->imageArea->zoomPanel->zoomFitClicked();
|
||||
return true;
|
||||
|
||||
case GDK_KEY_F5:
|
||||
openThm->openDefaultViewer ((event->state & GDK_SHIFT_MASK) ? 2 : 1);
|
||||
return true;
|
||||
|
@@ -24,6 +24,14 @@
|
||||
IndicateClippedPanel::IndicateClippedPanel (ImageArea* ia) : imageArea(ia)
|
||||
{
|
||||
|
||||
iFon = new RTImage ("previewmodeF-focusScreen-on.png");
|
||||
iFoff = new RTImage ("previewmodeF-focusScreen-off.png");
|
||||
|
||||
previewFocusMask = Gtk::manage (new Gtk::ToggleButton ());
|
||||
previewFocusMask->set_relief(Gtk::RELIEF_NONE);
|
||||
previewFocusMask->set_tooltip_markup (M("MAIN_TOOLTIP_PREVIEWFOCUSMASK"));
|
||||
previewFocusMask->set_image(*iFoff);
|
||||
|
||||
Glib::ustring tt;
|
||||
|
||||
indclippedh = Gtk::manage (new Gtk::ToggleButton ());
|
||||
@@ -48,14 +56,17 @@ IndicateClippedPanel::IndicateClippedPanel (ImageArea* ia) : imageArea(ia)
|
||||
indclippeds->set_tooltip_markup (tt);
|
||||
}
|
||||
|
||||
previewFocusMask->set_active (false);
|
||||
indclippedh->set_active (options.showClippedHighlights);
|
||||
indclippeds->set_active (options.showClippedShadows);
|
||||
|
||||
pack_start (*previewFocusMask, Gtk::PACK_SHRINK, 0);
|
||||
pack_start (*indclippeds, Gtk::PACK_SHRINK, 0);
|
||||
pack_start (*indclippedh, Gtk::PACK_SHRINK, 0);
|
||||
|
||||
indclippedh->signal_toggled().connect( sigc::mem_fun(*this, &IndicateClippedPanel::buttonToggled) );
|
||||
indclippeds->signal_toggled().connect( sigc::mem_fun(*this, &IndicateClippedPanel::buttonToggled) );
|
||||
connFocusMask = previewFocusMask->signal_toggled().connect( sigc::bind(sigc::mem_fun(*this, &IndicateClippedPanel::buttonToggled), previewFocusMask) );
|
||||
connClippedS = indclippeds->signal_toggled().connect( sigc::bind(sigc::mem_fun(*this, &IndicateClippedPanel::buttonToggled), indclippeds) );
|
||||
connClippedH = indclippedh->signal_toggled().connect( sigc::bind(sigc::mem_fun(*this, &IndicateClippedPanel::buttonToggled), indclippedh) );
|
||||
|
||||
show_all ();
|
||||
}
|
||||
@@ -70,8 +81,35 @@ void IndicateClippedPanel::toggleClipped (bool highlights)
|
||||
}
|
||||
}
|
||||
|
||||
void IndicateClippedPanel::buttonToggled ()
|
||||
void IndicateClippedPanel::toggleFocusMask ()
|
||||
{
|
||||
previewFocusMask->set_active(!previewFocusMask->get_active());
|
||||
}
|
||||
|
||||
void IndicateClippedPanel::buttonToggled (Gtk::ToggleButton* tb)
|
||||
{
|
||||
|
||||
connFocusMask.block(true);
|
||||
connClippedS.block(true);
|
||||
connClippedH.block(true);
|
||||
|
||||
if (tb != previewFocusMask) {
|
||||
previewFocusMask->set_active(false);
|
||||
} else {
|
||||
if (indclippeds->get_active()) {
|
||||
indclippeds->set_active(false);
|
||||
}
|
||||
if (indclippedh->get_active()) {
|
||||
indclippedh->set_active(false);
|
||||
}
|
||||
}
|
||||
|
||||
previewFocusMask->set_image(previewFocusMask->get_active() ? *iFon : *iFoff);
|
||||
|
||||
connFocusMask.block(false);
|
||||
connClippedS.block(false);
|
||||
connClippedH.block(false);
|
||||
|
||||
imageArea->queue_draw ();
|
||||
|
||||
// this will redraw the linked Before image area
|
||||
@@ -80,3 +118,9 @@ void IndicateClippedPanel::buttonToggled ()
|
||||
imageArea->iLinkedImageArea->queue_draw ();
|
||||
}
|
||||
}
|
||||
|
||||
IndicateClippedPanel::~IndicateClippedPanel ()
|
||||
{
|
||||
delete iFon;
|
||||
delete iFoff;
|
||||
}
|
||||
|
@@ -25,24 +25,34 @@ class IndicateClippedPanel : public Gtk::HBox
|
||||
{
|
||||
|
||||
protected:
|
||||
Gtk::Image* iFon, *iFoff;
|
||||
Gtk::ToggleButton* previewFocusMask;
|
||||
Gtk::ToggleButton* indclippedh;
|
||||
Gtk::ToggleButton* indclippeds;
|
||||
ImageArea* imageArea;
|
||||
|
||||
public:
|
||||
explicit IndicateClippedPanel (ImageArea* ia);
|
||||
explicit IndicateClippedPanel(ImageArea* ia);
|
||||
~IndicateClippedPanel();
|
||||
|
||||
void buttonToggled ();
|
||||
void buttonToggled(Gtk::ToggleButton* tb);
|
||||
void toggleClipped(bool highlights); // inverts a toggle programmatically
|
||||
void toggleFocusMask();
|
||||
|
||||
void toggleClipped (bool highlights); // inverts a toggle programmatically
|
||||
sigc::connection connFocusMask, connClippedS, connClippedH;
|
||||
|
||||
bool showClippedShadows ()
|
||||
|
||||
bool showFocusMask ()
|
||||
{
|
||||
return indclippeds->get_active ();
|
||||
return previewFocusMask->get_active ();
|
||||
}
|
||||
bool showClippedHighlights ()
|
||||
bool showClippedShadows()
|
||||
{
|
||||
return indclippedh->get_active ();
|
||||
return indclippeds->get_active();
|
||||
}
|
||||
bool showClippedHighlights()
|
||||
{
|
||||
return indclippedh->get_active();
|
||||
}
|
||||
};
|
||||
|
||||
|
@@ -28,7 +28,6 @@ PreviewModePanel::PreviewModePanel (ImageArea* ia) : imageArea(ia)
|
||||
iG = new RTImage ("previewmodeG-on.png");
|
||||
iB = new RTImage ("previewmodeB-on.png");
|
||||
iL = new RTImage ("previewmodeL-on.png");
|
||||
iF = new RTImage ("previewmodeF-on.png");
|
||||
iBC0 = new RTImage ("previewmodeBC0-on.png");
|
||||
iBC1 = new RTImage ("previewmodeBC1-on.png");
|
||||
iBC2 = new RTImage ("previewmodeBC2-on.png");
|
||||
@@ -38,7 +37,6 @@ PreviewModePanel::PreviewModePanel (ImageArea* ia) : imageArea(ia)
|
||||
igG = new RTImage ("previewmodeG-off.png");
|
||||
igB = new RTImage ("previewmodeB-off.png");
|
||||
igL = new RTImage ("previewmodeL-off.png");
|
||||
igF = new RTImage ("previewmodeF-off.png");
|
||||
igBC0 = new RTImage ("previewmodeBC0-off.png");
|
||||
igBC1 = new RTImage ("previewmodeBC1-off.png");
|
||||
igBC2 = new RTImage ("previewmodeBC2-off.png");
|
||||
@@ -84,16 +82,10 @@ PreviewModePanel::PreviewModePanel (ImageArea* ia) : imageArea(ia)
|
||||
previewL->set_tooltip_markup (M("MAIN_TOOLTIP_PREVIEWL"));
|
||||
previewL->set_image(*igL);
|
||||
|
||||
previewFocusMask = Gtk::manage (new Gtk::ToggleButton ());
|
||||
previewFocusMask->set_relief(Gtk::RELIEF_NONE);
|
||||
previewFocusMask->set_tooltip_markup (M("MAIN_TOOLTIP_PREVIEWFOCUSMASK"));
|
||||
previewFocusMask->set_image(*igF);
|
||||
|
||||
previewR->set_active (false);
|
||||
previewG->set_active (false);
|
||||
previewB->set_active (false);
|
||||
previewL->set_active (false);
|
||||
previewFocusMask->set_active (false);
|
||||
|
||||
backColor0->set_active (options.bgcolor == 0);
|
||||
backColor1->set_active (options.bgcolor == 1);
|
||||
@@ -111,13 +103,11 @@ PreviewModePanel::PreviewModePanel (ImageArea* ia) : imageArea(ia)
|
||||
pack_start (*previewG, Gtk::PACK_SHRINK, 0);
|
||||
pack_start (*previewB, Gtk::PACK_SHRINK, 0);
|
||||
pack_start (*previewL, Gtk::PACK_SHRINK, 0);
|
||||
pack_start (*previewFocusMask, Gtk::PACK_SHRINK, 0);
|
||||
|
||||
connR = previewR->signal_toggled().connect( sigc::bind(sigc::mem_fun(*this, &PreviewModePanel::buttonToggled), previewR) );
|
||||
connG = previewG->signal_toggled().connect( sigc::bind(sigc::mem_fun(*this, &PreviewModePanel::buttonToggled), previewG) );
|
||||
connB = previewB->signal_toggled().connect( sigc::bind(sigc::mem_fun(*this, &PreviewModePanel::buttonToggled), previewB) );
|
||||
connL = previewL->signal_toggled().connect( sigc::bind(sigc::mem_fun(*this, &PreviewModePanel::buttonToggled), previewL) );
|
||||
connFocusMask = previewFocusMask->signal_toggled().connect( sigc::bind(sigc::mem_fun(*this, &PreviewModePanel::buttonToggled), previewFocusMask) );
|
||||
|
||||
connbackColor0 = backColor0->signal_toggled().connect( sigc::bind(sigc::mem_fun(*this, &PreviewModePanel::buttonToggled_backColor), backColor0) );
|
||||
connbackColor1 = backColor1->signal_toggled().connect( sigc::bind(sigc::mem_fun(*this, &PreviewModePanel::buttonToggled_backColor), backColor1) );
|
||||
@@ -133,7 +123,6 @@ PreviewModePanel::~PreviewModePanel ()
|
||||
delete iG;
|
||||
delete iB;
|
||||
delete iL;
|
||||
delete iF;
|
||||
delete iBC0;
|
||||
delete iBC1;
|
||||
delete iBC2;
|
||||
@@ -142,7 +131,6 @@ PreviewModePanel::~PreviewModePanel ()
|
||||
delete igG;
|
||||
delete igB;
|
||||
delete igL;
|
||||
delete igF;
|
||||
delete igBC0;
|
||||
delete igBC1;
|
||||
delete igBC2;
|
||||
@@ -165,10 +153,6 @@ void PreviewModePanel::toggleL ()
|
||||
{
|
||||
previewL->set_active(!previewL->get_active());
|
||||
}
|
||||
void PreviewModePanel::toggleFocusMask ()
|
||||
{
|
||||
previewFocusMask->set_active(!previewFocusMask->get_active());
|
||||
}
|
||||
|
||||
void PreviewModePanel::togglebackColor0 ()
|
||||
{
|
||||
@@ -194,7 +178,6 @@ void PreviewModePanel::buttonToggled (Gtk::ToggleButton* tbpreview)
|
||||
connG.block(true);
|
||||
connB.block(true);
|
||||
connL.block(true);
|
||||
connFocusMask.block(true);
|
||||
|
||||
// control state of the buttons
|
||||
// only 0 or 1 button at a time can remain pressed
|
||||
@@ -214,22 +197,16 @@ void PreviewModePanel::buttonToggled (Gtk::ToggleButton* tbpreview)
|
||||
previewL->set_active(false);
|
||||
}
|
||||
|
||||
if (tbpreview != previewFocusMask) {
|
||||
previewFocusMask->set_active(false);
|
||||
}
|
||||
|
||||
// set image based on button's state
|
||||
previewR->set_image(previewR->get_active() ? *iR : *igR);
|
||||
previewG->set_image(previewG->get_active() ? *iG : *igG);
|
||||
previewB->set_image(previewB->get_active() ? *iB : *igB);
|
||||
previewL->set_image(previewL->get_active() ? *iL : *igL);
|
||||
previewFocusMask->set_image(previewFocusMask->get_active() ? *iF : *igF);
|
||||
|
||||
connR.block(false);
|
||||
connG.block(false);
|
||||
connB.block(false);
|
||||
connL.block(false);
|
||||
connFocusMask.block(false);
|
||||
|
||||
imageArea->queue_draw ();
|
||||
|
||||
|
@@ -30,7 +30,6 @@ protected:
|
||||
Gtk::ToggleButton* previewG;
|
||||
Gtk::ToggleButton* previewB;
|
||||
Gtk::ToggleButton* previewL;
|
||||
Gtk::ToggleButton* previewFocusMask;
|
||||
Gtk::ToggleButton* backColor0;
|
||||
Gtk::ToggleButton* backColor1;
|
||||
Gtk::ToggleButton* backColor2;
|
||||
@@ -41,7 +40,6 @@ protected:
|
||||
Gtk::Image* iG, *igG;
|
||||
Gtk::Image* iB, *igB;
|
||||
Gtk::Image* iL, *igL;
|
||||
Gtk::Image* iF, *igF;
|
||||
Gtk::Image* iBC0, *igBC0;
|
||||
Gtk::Image* iBC1, *igBC1;
|
||||
Gtk::Image* iBC2, *igBC2;
|
||||
@@ -55,14 +53,13 @@ public:
|
||||
void toggleG ();
|
||||
void toggleB ();
|
||||
void toggleL ();
|
||||
void toggleFocusMask ();
|
||||
void togglebackColor0();
|
||||
void togglebackColor1();
|
||||
void togglebackColor2();
|
||||
void togglebackColor3();
|
||||
void togglebackColor();
|
||||
|
||||
sigc::connection connR, connB, connG, connL, connFocusMask, connbackColor0, connbackColor1, connbackColor2, connbackColor3;
|
||||
sigc::connection connR, connB, connG, connL, connbackColor0, connbackColor1, connbackColor2, connbackColor3;
|
||||
|
||||
void buttonToggled(Gtk::ToggleButton* tbpreview);
|
||||
void buttonToggled_backColor(Gtk::ToggleButton* tbbackColor);
|
||||
@@ -83,10 +80,6 @@ public:
|
||||
{
|
||||
return previewL->get_active ();
|
||||
}
|
||||
bool showFocusMask ()
|
||||
{
|
||||
return previewFocusMask->get_active ();
|
||||
}
|
||||
int GetbackColor();
|
||||
|
||||
};
|
||||
|
Reference in New Issue
Block a user