Fixing last review comments

This commit is contained in:
Pandagrapher
2023-10-13 19:10:21 +02:00
parent 488a157476
commit 0495b9b151
4 changed files with 678 additions and 15 deletions

View File

@@ -74,8 +74,8 @@ ControlSpotPanel::ControlSpotPanel():
struc_(Gtk::manage(new Adjuster(M("TP_LOCALLAB_THRES"), 1.0, 12.0, 0.1, 4.0))),
thresh_(Gtk::manage(new Adjuster(M("TP_LOCALLAB_THRESDELTAE"), 0.0, 10.0, 0.1, 2.0))),
iter_(Gtk::manage(new Adjuster(M("TP_LOCALLAB_PROXI"), 0.2, 10.0, 0.1, 2.0))),
balan_(Gtk::manage(new Adjuster(M("TP_LOCALLAB_BALAN"), 0.2, 2.5, 0.1, 1.0, Gtk::manage(new RTImage("rawtherapee")), Gtk::manage(new RTImage("circle-white-small"))))),
balanh_(Gtk::manage(new Adjuster(M("TP_LOCALLAB_BALANH"), 0.2, 2.5, 0.1, 1.0, Gtk::manage(new RTImage("rawtherapee")), Gtk::manage(new RTImage("circle-red-green-small"))))),
balan_(Gtk::manage(new Adjuster(M("TP_LOCALLAB_BALAN"), 0.2, 2.5, 0.1, 1.0, Gtk::manage(new RTImage("circle-multicolor-small")), Gtk::manage(new RTImage("circle-white-small"))))),
balanh_(Gtk::manage(new Adjuster(M("TP_LOCALLAB_BALANH"), 0.2, 2.5, 0.1, 1.0, Gtk::manage(new RTImage("circle-multicolor-small")), Gtk::manage(new RTImage("circle-red-green-small"))))),
colorde_(Gtk::manage(new Adjuster(M("TP_LOCALLAB_COLORDE"), -15, 15, 2, 5, Gtk::manage(new RTImage("circle-blue-yellow-small")), Gtk::manage(new RTImage("circle-gray-green-small"))))),
colorscope_(Gtk::manage(new Adjuster(M("TP_LOCALLAB_COLORSCOPE"), 0., 100.0, 1., 30.))),
avoidrad_(Gtk::manage(new Adjuster(M("TP_LOCALLAB_AVOIDRAD"), 0., 30.0, 0.1, 0.))),

View File

@@ -62,8 +62,10 @@ EditWindow::EditWindow (RTWindow* p)
, isClosed(true)
, isMinimized(false)
{
// Set window icon
// For UNIX system, set app icon
#ifndef _WIN32
set_default_icon_name("rawtherapee");
#endif
set_title_decorated("");
set_modal(false);

View File

@@ -183,20 +183,10 @@ void SHCSelector::updateDrawingArea (const ::Cairo::RefPtr< Cairo::Context> &cr)
// Update font
fontd.set_weight (Pango::WEIGHT_NORMAL);
const double fontSize = static_cast<double>(h) * 0.8; // pt
// Converting font size to "px" based on DPI and scale
#ifndef __APPLE__
const double fontScale = RTScalable::getDPI() / RTScalable::pangoDPI; // Refer to notes in rtscalable.h
#else
// On MacOS, font is already scaled by the System library
// Refer to https://gitlab.gnome.org/GNOME/gtk/-/blob/gtk-3-24/gdk/quartz/gdkscreen-quartz.c
const double fontScale = 1.;
#endif
const double absoluteFontSize = static_cast<double>(fontSize) * fontScale; // px
const double fontSize = static_cast<double>(h) * 0.8; // px
// Absolute size is defined in "Pango units" and shall be multiplied by
// Pango::SCALE from "px":
fontd.set_absolute_size (absoluteFontSize * static_cast<double>(Pango::SCALE));
fontd.set_absolute_size (fontSize * static_cast<double>(Pango::SCALE));
context->set_font_description (fontd);
Glib::RefPtr<Pango::Layout> layout = create_pango_layout(Glib::ustring::format(std::setprecision(2), positions[i]));