Enhancement: option for a square detail window, fix for filebrowser ribbon height, small cleanup (issue 918)

This commit is contained in:
michael 2011-08-18 15:21:36 -04:00
parent d0d38b958d
commit cb4ab1fabd
8 changed files with 27 additions and 3 deletions

View File

@ -664,6 +664,7 @@ PREFERENCES_SND_BATCHQUEUEDONE;Queue processing done
PREFERENCES_SND_HELP;Either enter filepath or nothing (for no sound). On Windows use "SystemDefault", "SystemAsterisk" etc. for system sounds.
PREFERENCES_SND_LNGEDITPROCDONE;Editor processing done
PREFERENCES_SND_TRESHOLDSECS;after secs
PREFERENCES_SQUAREDETAILWINDOW;Square detail window (faster)
PREFERENCES_STARTUPIMDIR;Image directory at startup
PREFERENCES_TAB_BROWSER;File Browser
PREFERENCES_TAB_COLORMGR;Color Management

View File

@ -70,7 +70,7 @@ FileCatalog::FileCatalog (CoarsePanel* cp, ToolBar* tb, FilePanel* filepanel) :
trashButtonBox->show ();
//initialize hbToolBar1
Gtk::HBox* hbToolBar1 = Gtk::manage(new Gtk::HBox ());
hbToolBar1 = Gtk::manage(new Gtk::HBox ());
//setup BrowsePath
iRefreshWhite = new Gtk::Image(argv0+"/images/refresh_white.png");
@ -654,6 +654,9 @@ void FileCatalog::refreshThumbImages () {
void FileCatalog::refreshHeight () {
int newHeight=fileBrowser->getEffectiveHeight() + buttonBar->get_height();
if (!options.FileBrowserToolbarSingleRow) {
newHeight += hbToolBar1->get_height();
}
set_size_request(0, newHeight);
}

View File

@ -79,7 +79,7 @@ class FileCatalog : public Gtk::VBox,
DirBrowserRemoteInterface* dirlistener;
Gtk::HBox* buttonBar;
Gtk::HBox* buttonBar2;
Gtk::HBox* hbToolBar1;
Gtk::HBox* fltrRankbox;
Gtk::HBox* fltrLabelbox;

View File

@ -24,6 +24,7 @@
#include <iomanip>
#include <cropwindow.h>
#include <refreshmap.h>
#include <options.h>
ImageArea::ImageArea (ImageAreaPanel* p) : parent(p) {
@ -273,8 +274,18 @@ void ImageArea::addCropWindow () {
int layer = N/K/K;
int row = K-1 - (N % (K*K)) / K;
int col = K-1 - (N % (K*K)) % K;
int cropwidth, cropheight;
cw->setSize (get_width()/K - hBorder, get_height()/K - vBorder);
cropwidth = get_width()/K - hBorder;
cropheight = get_height()/K - vBorder;
if (options.squareDetailWindow){
// force square CropWindow (this is faster as area is smaller)
if (cropwidth<cropheight) cropheight=cropwidth;
if (cropheight<cropwidth) cropwidth=cropheight;
}
cw->setSize (cropwidth,cropheight);
cw->setPosition (col*get_width()/K + hBorder/2 + layer*30, row*get_height()/K + vBorder/2 + layer*30);
}
else {

View File

@ -152,6 +152,7 @@ void Options::setDefaults () {
histogramBar = true;
showProfileSelector = true;
FileBrowserToolbarSingleRow = true;
squareDetailWindow = false;
menuGroupRank = true;
menuGroupLabel = true;
menuGroupFileOperations = true;
@ -398,6 +399,7 @@ if (keyFile.has_group ("GUI")) {
if (keyFile.has_key ("GUI", "HistogramPosition")) histogramPosition = keyFile.get_integer ("GUI", "HistogramPosition");
if (keyFile.has_key ("GUI", "HistogramBar")) histogramBar = keyFile.get_boolean ("GUI", "HistogramBar");
if (keyFile.has_key ("GUI", "ShowProfileSelector")) showProfileSelector = keyFile.get_boolean ("GUI", "ShowProfileSelector");
if (keyFile.has_key ("GUI", "SquareDetailWindow")) squareDetailWindow = keyFile.get_boolean ("GUI", "SquareDetailWindow");
if (keyFile.has_key ("GUI", "FileBrowserToolbarSingleRow")) FileBrowserToolbarSingleRow = keyFile.get_boolean ("GUI", "FileBrowserToolbarSingleRow");
}
@ -567,6 +569,7 @@ int Options::saveToFile (Glib::ustring fname) {
keyFile.set_integer ("GUI", "HistogramPosition", histogramPosition);
keyFile.set_boolean ("GUI", "HistogramBar", histogramBar);
keyFile.set_boolean ("GUI", "ShowProfileSelector", showProfileSelector);
keyFile.set_boolean ("GUI", "SquareDetailWindow", squareDetailWindow);
keyFile.set_boolean ("GUI", "FileBrowserToolbarSingleRow", FileBrowserToolbarSingleRow);
//Glib::ArrayHandle<int> crvopen = crvOpen;

View File

@ -151,6 +151,7 @@ class Options {
int histogramPosition; // 0=disabled, 1=left pane, 2=right pane
bool histogramBar;
bool showProfileSelector;
bool squareDetailWindow;
bool FileBrowserToolbarSingleRow;
bool menuGroupRank;

View File

@ -428,6 +428,8 @@ Gtk::Widget* Preferences::getGeneralPanel () {
hbworkflow2->pack_start (*ckbHistogramPositionLeft, Gtk::PACK_SHRINK, 4);
ckbShowProfileSelector = Gtk::manage( new Gtk::CheckButton (M("PREFERENCES_SHOWPROFILESELECTOR")) );
hbworkflow2->pack_start (*ckbShowProfileSelector, Gtk::PACK_SHRINK, 4);
ckbSquareDetailWindow = Gtk::manage( new Gtk::CheckButton (M("PREFERENCES_SQUAREDETAILWINDOW")) );
hbworkflow2->pack_start (*ckbSquareDetailWindow, Gtk::PACK_SHRINK, 4);
vbworkflow->pack_start (*hbworkflow2, Gtk::PACK_SHRINK, 4);
Gtk::HBox* hbworkflow3 = Gtk::manage( new Gtk::HBox () );
@ -1010,6 +1012,7 @@ void Preferences::storePreferences () {
moptions.histogramPosition = ckbHistogramPositionLeft->get_active() ? 1 : 2;
moptions.showProfileSelector = ckbShowProfileSelector->get_active();
moptions.squareDetailWindow = ckbSquareDetailWindow->get_active();
moptions.FileBrowserToolbarSingleRow = ckbFileBrowserToolbarSingleRow->get_active();
moptions.overwriteOutputFile = chOverwriteOutputFile->get_active ();
@ -1121,6 +1124,7 @@ void Preferences::fillPreferences () {
ckbHistogramPositionLeft->set_active(moptions.histogramPosition==1);
ckbShowProfileSelector->set_active(moptions.showProfileSelector);
ckbSquareDetailWindow->set_active(moptions.squareDetailWindow);
ckbFileBrowserToolbarSingleRow->set_active(moptions.FileBrowserToolbarSingleRow);
//darkFrameDir->set_filename( moptions.rtSettings.darkFramesPath );

View File

@ -130,6 +130,7 @@ class Preferences : public Gtk::Dialog {
Gtk::CheckButton* ckbHistogramPositionLeft;
Gtk::CheckButton* ckbShowProfileSelector;
Gtk::CheckButton* ckbFileBrowserToolbarSingleRow;
Gtk::CheckButton* ckbSquareDetailWindow;
Options moptions;