More bugfix from issue #3446

This commit is contained in:
Hombre 2016-10-23 21:05:23 +02:00
parent b2af94ac74
commit c1a6abbd43
7 changed files with 116 additions and 64 deletions

View File

@ -46,7 +46,7 @@ box {
border-style: none; border-style: none;
border-radius: 0; border-radius: 0;
margin: 0; margin: 0;
padding: 0; padding: 0;
} }
grid { grid {
@ -101,58 +101,87 @@ eventbox.frame {
border-color: #565656; border-color: #565656;
} }
window decoration { scrollbar {
padding: 0; background-color: #303030;
margin: 0; }
box-shadow: 0 0; scrollbar slider {
border-radius: 0 0 0 0; background-color: #808080;
}
scrollbar slider:hover {
background-color: #999999;
} }
button { button {
padding: 0; padding: 0;
min-height: 5px; min-height: 5px;
min-width: 5px; min-width: 5px;
background-image: linear-gradient(#343434, #2E2E2E, #292929); background-image: linear-gradient(#343434, #2E2E2E, #292929);
} }
button.flat { button.flat {
background-image: none; background-image: none;
} }
button.popupbutton-arrow {
min-width: 18px;
}
button:hover { button:hover {
background-image: linear-gradient(#444444, #3E3E3E, #393939); background-image: linear-gradient(#444444, #3E3E3E, #393939);
}
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);
} }
combobox { combobox {
min-height: 5px; min-height: 5px;
min-width: 5px; min-width: 5px;
margin-left: 2px;
} }
box { box {
padding: 0; padding: 0;
margin: 1px; margin: 1px;
min-height: 5px; min-height: 5px;
min-width: 5px; min-width: 5px;
} }
scale { scale {
padding: 0; padding: 0;
min-height: 5px; min-height: 5px;
margin: 0 6px 0 6px; /* have to be half of "scale slider" >> "min-width" for horizontalmargin */ margin: 0 7px 0 0;
} }
scale slider { scale slider {
/* Slider size is min-width x min-height ; margin have to be half of those values, but negative */ /* Slider size is min-width x min-height ; margin have to be half of those values, but negative */
min-width: 12px; min-width: 12px;
min-height: 12px; min-height: 12px;
margin: -6px; margin: -6px;
background-image: linear-gradient(#343434, #2E2E2E, #292929);
}
scale slider:hover {
background-image: linear-gradient(#444444, #3E3E3E, #393939);
}
scale trough {
margin: 6px 6px; /* have to be half of "scale slider / min-width min-height" */
background-color: #2A2A2A;
} }
/*.EditorTopPanel .button, .ToolBarPanelFileBrowser .button, .EditorZoomPanel .button {*/ /*.EditorTopPanel .button, .ToolBarPanelFileBrowser .button, .EditorZoomPanel .button {*/
.button { .button {
padding: 1px; padding: 1px;
margin: 1px; margin: 1px;
padding: 0; padding: 0;
min-height: 5px; min-height: 5px;
min-width: 5px; min-width: 5px;
} }
/* Adjusters */ /* Adjusters */
@ -167,7 +196,7 @@ scale slider {
separator { separator {
color: #363636; color: #363636;
margin: 5px; margin: 5px;
} }
progressbar.vertical { progressbar.vertical {
@ -234,7 +263,7 @@ button.Right {
/* [1.23[-][+]] */ /* [1.23[-][+]] */
entry, spinbutton { entry, spinbutton {
padding: 1px; padding: 1px;
margin: 0; margin: 0;
min-height: 10px; min-height: 10px;
background-color: #262626; background-color: #262626;
} }
@ -261,8 +290,8 @@ menu {
/* Context menu item */ /* Context menu item */
menuitem { menuitem {
padding: 2px; padding: 2px;
margin: 0; margin: 0;
min-height: 10px; min-height: 10px;
} }
#MyExpander { #MyExpander {
@ -289,7 +318,7 @@ menuitem {
#ExpanderBox2 frame, #ExpanderBox2 frame,
#ExpanderBox3 frame { #ExpanderBox3 frame {
padding: 2px 0 0 0; padding: 2px 0 0 0;
border-style: none; border-style: none;
} }
#ExpanderBox frame > border { #ExpanderBox frame > border {
background-color: #3B3B3B; background-color: #3B3B3B;
@ -304,19 +333,19 @@ menuitem {
#ExpanderBox frame > label, #ExpanderBox frame frame > label, #ExpanderBox frame > label, #ExpanderBox frame frame > label,
#ExpanderBox2 frame > label, #ExpanderBox2 frame frame > label, #ExpanderBox2 frame > label, #ExpanderBox2 frame frame > label,
#ExpanderBox3 frame > label, #ExpanderBox3 frame frame > label { #ExpanderBox3 frame > label, #ExpanderBox3 frame frame > label {
margin-left: 7pt; margin-left: 7pt;
margin-top: 0; margin-top: 0;
} }
#ExpanderBox frame > box, #ExpanderBox frame frame > box, #ExpanderBox frame > box, #ExpanderBox frame frame > box,
#ExpanderBox2 frame > box, #ExpanderBox2 frame frame > box, #ExpanderBox2 frame > box, #ExpanderBox2 frame frame > box,
#ExpanderBox3 frame > box, #ExpanderBox3 frame frame > box { #ExpanderBox3 frame > box, #ExpanderBox3 frame frame > box {
margin: 2px; margin: 2px;
} }
#ExpanderBox > box > checkbutton, #ExpanderBox > box > box, #ExpanderBox > box > checkbutton, #ExpanderBox > box > box,
#ExpanderBox2 > box > checkbutton, #ExpanderBox2 > box > box, #ExpanderBox2 > box > checkbutton, #ExpanderBox2 > box > box,
#ExpanderBox3 > box > checkbutton, #ExpanderBox3 > box > box { #ExpanderBox3 > box > checkbutton, #ExpanderBox3 > box > box {
margin-top: 3px; margin-top: 3px;
} }
#ExpanderBox frame drawingarea { #ExpanderBox frame drawingarea {
@ -379,8 +408,8 @@ menuitem {
#MyExpanderTitle label { #MyExpanderTitle label {
color: #CCCCCC; color: #CCCCCC;
padding: 0; padding: 0;
margin: 0 3px 0 3px; margin: 0 3px 0 3px;
} }
#MyExpanderTitle:hover { #MyExpanderTitle:hover {
background-color: #202020; background-color: #202020;
@ -406,8 +435,8 @@ menuitem {
/* File Browser right side tabs - Toolbox, Inspector, Fast Export, Filter */ /* File Browser right side tabs - Toolbox, Inspector, Fast Export, Filter */
notebook { notebook {
padding: 0; padding: 0;
margin: 0; margin: 0;
border-style: none; border-style: none;
} }
notebook header { notebook header {
@ -418,19 +447,19 @@ notebook header {
border-color: #262626; border-color: #262626;
border-radius: 0; border-radius: 0;
padding: 2px; padding: 2px;
margin: 0; margin: 0;
} }
notebook tabs { notebook tabs {
padding: 1px; padding: 1px;
margin: 0; margin: 0;
} }
notebook tab { notebook tab {
padding: 1px; padding: 1px;
margin: 2px; margin: 2px;
min-height: 15px; min-height: 15px;
min-width: 15px; min-width: 15px;
} }
notebook tab:hover { notebook tab:hover {
@ -472,18 +501,18 @@ notebook stack {
/* OK */ /* OK */
background-color: #484848; background-color: #484848;
padding: 0; padding: 0;
margin: 0; margin: 0;
} }
paned box { paned box {
padding: 0; padding: 0;
margin: 0; margin: 0;
border-style: none; border-style: none;
} }
paned > separator { paned > separator {
margin: 0; margin: 0;
padding: 0; padding: 0;
} }
#MainNotebook header { #MainNotebook header {
@ -510,7 +539,7 @@ paned > separator {
#RightNotebook tabs { #RightNotebook tabs {
/* OK */ /* OK */
background-color: #2A2A2A; background-color: #2A2A2A;
padding-bottom: 5px; padding-bottom: 5px;
} }
#RightNotebook tab:hover { #RightNotebook tab:hover {
/* OK */ /* OK */
@ -523,15 +552,15 @@ paned > separator {
} }
#LabelRightNotebook { #LabelRightNotebook {
padding: 5px; padding: 5px;
margin: 2px; margin: 2px;
} }
#ToolPanelNotebook header { #ToolPanelNotebook header {
background-color: #383838; background-color: #383838;
border-color: #262626; border-color: #262626;
padding: 0; padding: 0;
margin: 0; margin: 0;
} }
#ToolPanelNotebook header tabs { #ToolPanelNotebook header tabs {
@ -539,8 +568,8 @@ paned > separator {
} }
#ToolPanelNotebook header tab { #ToolPanelNotebook header tab {
padding: 3px; padding: 3px;
margin: 0; margin: 0;
} }
/* All tool panels have a frame except for Meta which unlike the rest is a notebook itself. /* All tool panels have a frame except for Meta which unlike the rest is a notebook itself.

View File

@ -87,7 +87,7 @@ Adjuster::Adjuster (Glib::ustring vlabel, double vmin, double vmax, double vstep
reset->set_can_focus(false); reset->set_can_focus(false);
spin = Gtk::manage (new MySpinButton ()); spin = Gtk::manage (new MySpinButton ());
setExpandAlignProperties(spin, false, false, Gtk::ALIGN_CENTER, !vlabel.empty() ? Gtk::ALIGN_BASELINE : Gtk::ALIGN_CENTER); setExpandAlignProperties(spin, false, false, Gtk::ALIGN_CENTER, Gtk::ALIGN_CENTER);
spin->set_input_purpose(Gtk::INPUT_PURPOSE_DIGITS); spin->set_input_purpose(Gtk::INPUT_PURPOSE_DIGITS);
reset->set_size_request (-1, spin->get_height() > MIN_RESET_BUTTON_HEIGHT ? spin->get_height() : MIN_RESET_BUTTON_HEIGHT); reset->set_size_request (-1, spin->get_height() > MIN_RESET_BUTTON_HEIGHT ? spin->get_height() : MIN_RESET_BUTTON_HEIGHT);
@ -95,7 +95,7 @@ Adjuster::Adjuster (Glib::ustring vlabel, double vmin, double vmax, double vstep
slider = Gtk::manage (new MyHScale ()); slider = Gtk::manage (new MyHScale ());
setExpandAlignProperties(slider, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER); setExpandAlignProperties(slider, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER);
slider->set_draw_value (false); slider->set_draw_value (false);
//slider->set_has_origin(false); // ------------------ This will remove the colored part on the left of the slider's knob slider->set_has_origin(false); // ------------------ This will remove the colored part on the left of the slider's knob
if (vlabel.empty()) { if (vlabel.empty()) {
// No label, everything goes in a single row // No label, everything goes in a single row

View File

@ -45,6 +45,14 @@ void LockableColorPicker::updateBackBuffer ()
if (validity == Validity::INSIDE) { if (validity == Validity::INSIDE) {
Gtk::DrawingArea *iArea = cropWindow->getImageArea(); Gtk::DrawingArea *iArea = cropWindow->getImageArea();
Glib::RefPtr<Pango::Context> pangoContext = iArea->get_pango_context ();
Pango::FontDescription fontd = pangoContext->get_font_description();
// set font family and size
fontd.set_family("sans");
fontd.set_size(8 * Pango::SCALE); // 8pt, will be scaled by Gtk depending on the screen's DPI
fontd.set_weight(Pango::WEIGHT_NORMAL);
pangoContext->set_font_description (fontd);
Glib::RefPtr<Pango::Layout> layout[3][2]; Glib::RefPtr<Pango::Layout> layout[3][2];
Glib::ustring s1, s2, s3; Glib::ustring s1, s2, s3;
PointerMotionListener* navigator = cropWindow->getPointerMotionListener (); PointerMotionListener* navigator = cropWindow->getPointerMotionListener ();

View File

@ -143,7 +143,7 @@ public:
void get_preferred_height_vfunc (int& minimum_height, int& natural_height) const; void get_preferred_height_vfunc (int& minimum_height, int& natural_height) const;
void get_preferred_width_vfunc (int &minimum_width, int &natural_width) const; void get_preferred_width_vfunc (int &minimum_width, int &natural_width) const;
void get_preferred_height_for_width_vfunc (int width, int &minimum_height, int &natural_height) const; void get_preferred_height_for_width_vfunc (int width, int &minimum_height, int &natural_height) const;
void get_preferred_width_for_height_vfunc (int width, int &minimum_width, int &natural_width) const; void get_preferred_width_for_height_vfunc (int height, int &minimum_width, int &natural_width) const;
}; };
class MyCurveIdleHelper class MyCurveIdleHelper

View File

@ -86,6 +86,7 @@ Navigator::Navigator () : currentRGBUnit(options.navRGBUnit), currentHSVUnit(opt
LAB_L->set_alignment(Gtk::ALIGN_END); LAB_L->set_alignment(Gtk::ALIGN_END);
// set font family and size // set font family and size
/*
Glib::ustring fontname; Glib::ustring fontname;
#ifdef WIN32 #ifdef WIN32
@ -128,6 +129,7 @@ Navigator::Navigator () : currentRGBUnit(options.navRGBUnit), currentHSVUnit(opt
position->get_style_context()->add_provider(cssProvider, GTK_STYLE_PROVIDER_PRIORITY_USER); position->get_style_context()->add_provider(cssProvider, GTK_STYLE_PROVIDER_PRIORITY_USER);
} }
} }
*/
// setup the tables // setup the tables
Gtk::Table* table0 = Gtk::manage (new Gtk::Table (1, 3)); //rows, cols The main table container Gtk::Table* table0 = Gtk::manage (new Gtk::Table (1, 3)); //rows, cols The main table container

View File

@ -86,6 +86,7 @@ bool PopUpCommon::addEntry (const Glib::ustring& fileName, const Glib::ustring&
arrowButton->signal_button_release_event().connect_notify( sigc::mem_fun(*this, &PopUpCommon::showMenu) ); arrowButton->signal_button_release_event().connect_notify( sigc::mem_fun(*this, &PopUpCommon::showMenu) );
button->get_style_context()->add_class("Left"); button->get_style_context()->add_class("Left");
arrowButton->get_style_context()->add_class("Right"); arrowButton->get_style_context()->add_class("Right");
arrowButton->get_style_context()->add_class("popupbutton-arrow");
hasMenu = true; hasMenu = true;
} }

View File

@ -113,6 +113,18 @@ ToneCurve::ToneCurve () : FoldableToolPanel(this, "tonecurve", M("TP_EXPOSURE_LA
//---------Brightness / Contrast ------------------------- //---------Brightness / Contrast -------------------------
brightness = Gtk::manage (new Adjuster (M("TP_EXPOSURE_BRIGHTNESS"), -100, 100, 1, 0)); brightness = Gtk::manage (new Adjuster (M("TP_EXPOSURE_BRIGHTNESS"), -100, 100, 1, 0));
Glib::RefPtr<Gtk::CssProvider> cssProvider = Gtk::CssProvider::create();
if (cssProvider) {
try {
cssProvider->load_from_data("scale trough { background-image: linear-gradient(to right, #000 0%, #CCC 100%); }");
brightness->get_style_context()->add_provider(cssProvider, GTK_STYLE_PROVIDER_PRIORITY_USER);
} catch (Glib::Error &err) {
printf("Erreur: \"%s\"\n", err.what().c_str());
} catch (...) {
printf("Erreur inconnu !\n");
}
}
pack_start (*brightness); pack_start (*brightness);
contrast = Gtk::manage (new Adjuster (M("TP_EXPOSURE_CONTRAST"), -100, 100, 1, 0)); contrast = Gtk::manage (new Adjuster (M("TP_EXPOSURE_CONTRAST"), -100, 100, 1, 0));
pack_start (*contrast); pack_start (*contrast);