More bugfix for Gtk3.22
This commit is contained in:
parent
c1a6abbd43
commit
4d19b97109
@ -199,21 +199,27 @@ separator {
|
||||
margin: 5px;
|
||||
}
|
||||
|
||||
progressbar.vertical {
|
||||
min-width: 10px;
|
||||
progressbar.vertical trough {
|
||||
min-width: 6px;
|
||||
}
|
||||
progressbar.vertical trough progress {
|
||||
min-width: 6px;
|
||||
}
|
||||
|
||||
progressbar.horizontal {
|
||||
min-height: 10px;
|
||||
progressbar.horizontal trough {
|
||||
min-height: 6px;
|
||||
}
|
||||
progressbar.horizontal trough progress {
|
||||
min-height: 6px;
|
||||
}
|
||||
|
||||
drawingarea {
|
||||
.drawingarea {
|
||||
border-radius: 0;
|
||||
background-color: #363636;
|
||||
border: 1px solid #252525;
|
||||
}
|
||||
|
||||
drawingarea:selected {
|
||||
.drawingarea:selected {
|
||||
background-color: #565656;
|
||||
border-radius: 10px;
|
||||
}
|
||||
@ -594,6 +600,10 @@ paned > separator {
|
||||
margin: 5px;
|
||||
}
|
||||
|
||||
#PreviewWindow {
|
||||
border-style: solid none;
|
||||
}
|
||||
|
||||
.tooltip {
|
||||
padding: 0;
|
||||
}
|
||||
|
@ -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
|
||||
|
@ -401,6 +401,7 @@ HistogramRGBArea::HistogramRGBArea () ://needChroma unactive by default
|
||||
val(0), r(0), g(0), b(0), frozen(false), valid(false), needRed(true), needGreen(true), needBlue(true), needLuma(true), rawMode(false), showMode(options.histogramBar), barDisplayed(options.histogramBar), needChroma(false), parent(nullptr)
|
||||
{
|
||||
|
||||
get_style_context()->add_class("drawingarea");
|
||||
set_name("HistogramRGBArea");
|
||||
|
||||
harih = new HistogramRGBAreaIdleHelper;
|
||||
@ -488,13 +489,16 @@ void HistogramRGBArea::updateBackBuffer (int r, int g, int b, Glib::ustring prof
|
||||
window->get_geometry(winx, winy, winw, winh);
|
||||
|
||||
// This will create or update the size of the BackBuffer::surface
|
||||
setDrawRectangle(window, 0, 0, winw, winh, true);
|
||||
setDrawRectangle(Cairo::FORMAT_ARGB32, 0, 0, winw, winh, true);
|
||||
|
||||
if (surface) {
|
||||
Cairo::RefPtr<Cairo::Context> cc = Cairo::Context::create(surface);
|
||||
Glib::RefPtr<Gtk::StyleContext> style = get_style_context();
|
||||
|
||||
style->render_background (cc, 0, 0, surface->get_width(), surface->get_height());
|
||||
cc->set_source_rgba (0., 0., 0., 0.);
|
||||
cc->set_operator (Cairo::OPERATOR_CLEAR);
|
||||
cc->paint ();
|
||||
cc->set_operator (Cairo::OPERATOR_OVER);
|
||||
|
||||
cc->set_antialias(Cairo::ANTIALIAS_NONE);
|
||||
cc->set_line_width (1.0);
|
||||
@ -547,8 +551,6 @@ void HistogramRGBArea::updateBackBuffer (int r, int g, int b, Glib::ustring prof
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
style->render_frame (cc, 0, 0, surface->get_width(), surface->get_height());
|
||||
}
|
||||
|
||||
setDirty(false);
|
||||
@ -786,6 +788,9 @@ void HistogramRGBArea::on_realize ()
|
||||
bool HistogramRGBArea::on_draw(const ::Cairo::RefPtr< Cairo::Context> &cr)
|
||||
{
|
||||
|
||||
const Glib::RefPtr<Gtk::StyleContext> style = get_style_context();
|
||||
style->render_background(cr, 0, 0, get_width(), get_height());
|
||||
|
||||
// on_realize & updateBackBuffer have to be called before
|
||||
if (surface) {
|
||||
if (isDirty()) { // not sure this could happen...
|
||||
@ -795,6 +800,8 @@ bool HistogramRGBArea::on_draw(const ::Cairo::RefPtr< Cairo::Context> &cr)
|
||||
copySurface(cr, NULL);
|
||||
}
|
||||
|
||||
style->render_frame (cr, 0, 0, get_width(), get_height());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -822,6 +829,7 @@ HistogramArea::HistogramArea (FullModeListener *fml) : //needChroma unactive by
|
||||
bhist(256);
|
||||
chist(256);
|
||||
|
||||
get_style_context()->add_class("drawingarea");
|
||||
set_name("HistogramArea");
|
||||
|
||||
haih = new HistogramAreaIdleHelper;
|
||||
@ -951,7 +959,7 @@ SSEFUNCTION void HistogramArea::updateBackBuffer ()
|
||||
window->get_geometry(winx, winy, winw, winh);
|
||||
|
||||
// This will create or update the size of the BackBuffer::surface
|
||||
setDrawRectangle(window, 0, 0, winw, winh, true);
|
||||
setDrawRectangle(Cairo::FORMAT_ARGB32, 0, 0, winw, winh, true);
|
||||
|
||||
Cairo::RefPtr<Cairo::Context> cr = Cairo::Context::create(surface);
|
||||
const Glib::RefPtr<Gtk::StyleContext> style = get_style_context();
|
||||
@ -1211,16 +1219,14 @@ bool HistogramArea::on_draw(const ::Cairo::RefPtr< Cairo::Context> &cr)
|
||||
|
||||
Glib::RefPtr<Gdk::Window> window = get_window();
|
||||
|
||||
int winx, winy, winw, winh;
|
||||
window->get_geometry(winx, winy, winw, winh);
|
||||
|
||||
if (winw != oldwidth || winh != oldheight || isDirty ()) {
|
||||
if (get_width() != oldwidth || get_height() != oldheight || isDirty ()) {
|
||||
updateBackBuffer ();
|
||||
}
|
||||
|
||||
Glib::RefPtr<Gtk::StyleContext> style = get_style_context();
|
||||
style->render_background(cr, winx, winy, winw, winh);
|
||||
const Glib::RefPtr<Gtk::StyleContext> style = get_style_context();
|
||||
style->render_background(cr, 0, 0, get_width(), get_height());
|
||||
copySurface(cr, NULL);
|
||||
style->render_frame (cr, 0, 0, get_width(), get_height());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -38,6 +38,7 @@ MyCurve::MyCurve () : pipetteR(-1.f), pipetteG(-1.f), pipetteB(-1.f), pipetteVal
|
||||
edited_point = -1;
|
||||
|
||||
add_events(Gdk::POINTER_MOTION_MASK | Gdk::POINTER_MOTION_HINT_MASK | Gdk::ENTER_NOTIFY_MASK | Gdk::LEAVE_NOTIFY_MASK | Gdk::BUTTON_PRESS_MASK | Gdk::BUTTON_RELEASE_MASK | Gdk::BUTTON1_MOTION_MASK);
|
||||
get_style_context()->add_class("drawingarea");
|
||||
|
||||
mcih = new MyCurveIdleHelper;
|
||||
mcih->myCurve = this;
|
||||
|
@ -25,6 +25,7 @@ PreviewWindow::PreviewWindow () : previewHandler(NULL), mainCropWin(NULL), image
|
||||
zoom(0.0), isMoving(false), needsUpdate(false), cursor_type(CSUndefined)
|
||||
{
|
||||
set_name("PreviewWindow");
|
||||
get_style_context()->add_class("drawingarea");
|
||||
rconn = signal_size_allocate().connect( sigc::mem_fun(*this, &PreviewWindow::on_resized) );
|
||||
}
|
||||
|
||||
@ -60,12 +61,14 @@ void PreviewWindow::updatePreviewImage ()
|
||||
return;
|
||||
}
|
||||
|
||||
backBuffer = Cairo::RefPtr<BackBuffer> ( new BackBuffer(W, H, wind) );
|
||||
backBuffer = Cairo::RefPtr<BackBuffer> ( new BackBuffer(W, H, Cairo::FORMAT_ARGB32) );
|
||||
Cairo::RefPtr<Cairo::ImageSurface> surface = backBuffer->getSurface();
|
||||
Glib::RefPtr<Gtk::StyleContext> style = get_style_context();
|
||||
Cairo::RefPtr<Cairo::Context> cc = Cairo::Context::create(surface);
|
||||
style->render_background(cc, 0, 0, W, H);
|
||||
Gdk::RGBA c = style->get_background_color(Gtk::STATE_FLAG_NORMAL);
|
||||
cc->set_source_rgba (0., 0., 0., 0.);
|
||||
cc->set_operator (Cairo::OPERATOR_CLEAR);
|
||||
cc->paint ();
|
||||
cc->set_operator (Cairo::OPERATOR_OVER);
|
||||
cc->set_antialias(Cairo::ANTIALIAS_NONE);
|
||||
cc->set_line_join(Cairo::LINE_JOIN_MITER);
|
||||
|
||||
@ -86,7 +89,6 @@ void PreviewWindow::updatePreviewImage ()
|
||||
}
|
||||
}
|
||||
}
|
||||
style->render_frame (cc, 0, 0, W, H);
|
||||
}
|
||||
|
||||
void PreviewWindow::setPreviewHandler (PreviewHandler* ph)
|
||||
@ -108,6 +110,8 @@ void PreviewWindow::on_resized (Gtk::Allocation& req)
|
||||
|
||||
bool PreviewWindow::on_draw(const ::Cairo::RefPtr< Cairo::Context> &cr)
|
||||
{
|
||||
const Glib::RefPtr<Gtk::StyleContext> style = get_style_context();
|
||||
style->render_background(cr, 0, 0, get_width(), get_height());
|
||||
|
||||
if (!backBuffer) {
|
||||
return true;
|
||||
@ -155,6 +159,8 @@ bool PreviewWindow::on_draw(const ::Cairo::RefPtr< Cairo::Context> &cr)
|
||||
}
|
||||
}
|
||||
|
||||
style->render_frame (cr, 0, 0, get_width(), get_height());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -156,14 +156,15 @@ bool SHCSelector::on_draw(const ::Cairo::RefPtr< Cairo::Context> &cr)
|
||||
*/
|
||||
|
||||
// draw the box's borders
|
||||
cr->set_line_width (1.);
|
||||
c = style->get_border_color(state);
|
||||
cr->set_source_rgb (c.get_red(), c.get_green(), c.get_blue());
|
||||
cr->rectangle (leftMargin + 0.5, 0.5, w - 1, int(float(h) * 5.5f / 7.f + 0.5f) + 1);
|
||||
cr->stroke ();
|
||||
style->render_frame(cr, leftMargin + 0.5, 0.5, w - 1, int(float(h) * 5.5f / 7.f + 0.5f) + 1);
|
||||
//cr->set_line_width (1.);
|
||||
//c = style->get_border_color(state);
|
||||
//cr->set_source_rgb (c.get_red(), c.get_green(), c.get_blue());
|
||||
//cr->rectangle (leftMargin + 0.5, 0.5, w - 1, int(float(h) * 5.5f / 7.f + 0.5f) + 1);
|
||||
//cr->stroke ();
|
||||
|
||||
// draw sliders
|
||||
//cr->set_line_width (1.);
|
||||
cr->set_line_width (1.);
|
||||
for (int i = 0; i < 3; i++) {
|
||||
if (i == movingPosition) {
|
||||
style->set_state(Gtk::STATE_FLAG_ACTIVE);
|
||||
|
@ -113,18 +113,6 @@ 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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user