More bugfix from issue #3446
This commit is contained in:
@@ -87,7 +87,7 @@ Adjuster::Adjuster (Glib::ustring vlabel, double vmin, double vmax, double vstep
|
||||
reset->set_can_focus(false);
|
||||
|
||||
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);
|
||||
|
||||
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 ());
|
||||
setExpandAlignProperties(slider, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER);
|
||||
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()) {
|
||||
// No label, everything goes in a single row
|
||||
|
@@ -45,6 +45,14 @@ void LockableColorPicker::updateBackBuffer ()
|
||||
if (validity == Validity::INSIDE) {
|
||||
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::ustring s1, s2, s3;
|
||||
PointerMotionListener* navigator = cropWindow->getPointerMotionListener ();
|
||||
|
@@ -143,7 +143,7 @@ public:
|
||||
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_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
|
||||
|
@@ -86,6 +86,7 @@ Navigator::Navigator () : currentRGBUnit(options.navRGBUnit), currentHSVUnit(opt
|
||||
LAB_L->set_alignment(Gtk::ALIGN_END);
|
||||
|
||||
// set font family and size
|
||||
/*
|
||||
Glib::ustring fontname;
|
||||
|
||||
#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);
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
// setup the tables
|
||||
Gtk::Table* table0 = Gtk::manage (new Gtk::Table (1, 3)); //rows, cols The main table container
|
||||
|
@@ -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) );
|
||||
button->get_style_context()->add_class("Left");
|
||||
arrowButton->get_style_context()->add_class("Right");
|
||||
arrowButton->get_style_context()->add_class("popupbutton-arrow");
|
||||
hasMenu = true;
|
||||
}
|
||||
|
||||
|
@@ -113,6 +113,18 @@ ToneCurve::ToneCurve () : FoldableToolPanel(this, "tonecurve", M("TP_EXPOSURE_LA
|
||||
|
||||
//---------Brightness / Contrast -------------------------
|
||||
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);
|
||||
contrast = Gtk::manage (new Adjuster (M("TP_EXPOSURE_CONTRAST"), -100, 100, 1, 0));
|
||||
pack_start (*contrast);
|
||||
|
Reference in New Issue
Block a user