Added some keyboard shortcuts; see end of issue #83
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
/*
|
||||
* This file is part of RawTherapee.
|
||||
*
|
||||
* Copyright (c) 2004-2010 Gabor Horvath <hgabor@rawtherapee.com>
|
||||
*
|
||||
* RawTherapee is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -675,6 +674,13 @@ bool EditorPanel::handleShortcutKey (GdkEventKey* event) {
|
||||
iarea->imageArea->zoomPanel->zoomFitClicked();
|
||||
return true;
|
||||
|
||||
case GDK_less:
|
||||
iarea->imageArea->indClippedPanel->toggleClipped(true);
|
||||
return true;
|
||||
case GDK_greater:
|
||||
iarea->imageArea->indClippedPanel->toggleClipped(false);
|
||||
return true;
|
||||
|
||||
case GDK_F5:
|
||||
openThm->openDefaultViewer(event->state & GDK_SHIFT_MASK ? 2 : 1);
|
||||
return true;
|
||||
|
@@ -437,6 +437,14 @@ bool FileBrowser::keyPressed (GdkEventKey* event) {
|
||||
openDefaultViewer (dest);
|
||||
return true;
|
||||
}
|
||||
else if (event->keyval==GDK_Page_Up) {
|
||||
scrollPage(GDK_SCROLL_UP);
|
||||
return true;
|
||||
}
|
||||
else if (event->keyval==GDK_Page_Down) {
|
||||
scrollPage(GDK_SCROLL_DOWN);
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
@@ -1,7 +1,6 @@
|
||||
/*
|
||||
* This file is part of RawTherapee.
|
||||
*
|
||||
* Copyright (c) 2004-2010 Gabor Horvath <hgabor@rawtherapee.com>
|
||||
*
|
||||
* RawTherapee is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -45,7 +44,14 @@ IndicateClippedPanel::IndicateClippedPanel (ImageArea* ia) : imageArea(ia) {
|
||||
show_all ();
|
||||
}
|
||||
|
||||
void IndicateClippedPanel::buttonToggled () {
|
||||
// inverts a toggle programmatically
|
||||
void IndicateClippedPanel::toggleClipped (bool highlights) {
|
||||
if (highlights)
|
||||
indclippedh->set_active(!indclippedh->get_active());
|
||||
else
|
||||
indclippeds->set_active(!indclippeds->get_active());
|
||||
}
|
||||
|
||||
void IndicateClippedPanel::buttonToggled () {
|
||||
imageArea->queue_draw ();
|
||||
}
|
||||
|
@@ -1,7 +1,6 @@
|
||||
/*
|
||||
* This file is part of RawTherapee.
|
||||
*
|
||||
* Copyright (c) 2004-2010 Gabor Horvath <hgabor@rawtherapee.com>
|
||||
*
|
||||
* RawTherapee is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -34,6 +33,8 @@ class IndicateClippedPanel : public Gtk::HBox {
|
||||
|
||||
void buttonToggled ();
|
||||
|
||||
void toggleClipped (bool highlights); // inverts a toggle programmatically
|
||||
|
||||
bool showClippedShadows () { return indclippeds->get_active (); }
|
||||
bool showClippedHighlights () { return indclippedh->get_active (); }
|
||||
};
|
||||
|
@@ -68,13 +68,19 @@ void ThumbBrowserBase::scrollChanged () {
|
||||
}
|
||||
|
||||
void ThumbBrowserBase::scroll (int direction) {
|
||||
|
||||
if (arrangement==TB_Vertical)
|
||||
vscroll.set_value (vscroll.get_value() + (direction==GDK_SCROLL_DOWN ? +1 : -1) * vscroll.get_adjustment()->get_step_increment());
|
||||
else
|
||||
hscroll.set_value (hscroll.get_value() + (direction==GDK_SCROLL_DOWN ? +1 : -1) * hscroll.get_adjustment()->get_step_increment());
|
||||
}
|
||||
|
||||
void ThumbBrowserBase::scrollPage (int direction) {
|
||||
if (arrangement==TB_Vertical)
|
||||
vscroll.set_value (vscroll.get_value() + (direction==GDK_SCROLL_DOWN ? +1 : -1) * vscroll.get_adjustment()->get_page_increment());
|
||||
else
|
||||
hscroll.set_value (hscroll.get_value() + (direction==GDK_SCROLL_DOWN ? +1 : -1) * hscroll.get_adjustment()->get_page_increment());
|
||||
}
|
||||
|
||||
void ThumbBrowserBase::resizeThumbnailArea (int w, int h) {
|
||||
|
||||
inW = w;
|
||||
|
@@ -69,6 +69,7 @@ class ThumbBrowserBase : public Gtk::VBox {
|
||||
void configScrollBars ();
|
||||
void scrollChanged ();
|
||||
void scroll (int direction);
|
||||
void scrollPage (int direction);
|
||||
|
||||
protected:
|
||||
|
||||
|
Reference in New Issue
Block a user