From 0495b9b151378d7e8f4a437a5f6028f37b1d024b Mon Sep 17 00:00:00 2001 From: Pandagrapher Date: Fri, 13 Oct 2023 19:10:21 +0200 Subject: [PATCH] Fixing last review comments --- .../scalable/apps/circle-multicolor-small.svg | 671 ++++++++++++++++++ rtgui/controlspotpanel.cc | 4 +- rtgui/editwindow.cc | 4 +- rtgui/shcselector.cc | 14 +- 4 files changed, 678 insertions(+), 15 deletions(-) create mode 100644 rtdata/icons/rawtherapee/scalable/apps/circle-multicolor-small.svg diff --git a/rtdata/icons/rawtherapee/scalable/apps/circle-multicolor-small.svg b/rtdata/icons/rawtherapee/scalable/apps/circle-multicolor-small.svg new file mode 100644 index 000000000..ba109a903 --- /dev/null +++ b/rtdata/icons/rawtherapee/scalable/apps/circle-multicolor-small.svg @@ -0,0 +1,671 @@ + + + + + + + + + + + + + + + + + + image/svg+xml + + + + Maciej Dworak + + + + + + + + RawTherapee icon. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/rtgui/controlspotpanel.cc b/rtgui/controlspotpanel.cc index c3f09eb75..70e4ffbfd 100644 --- a/rtgui/controlspotpanel.cc +++ b/rtgui/controlspotpanel.cc @@ -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.))), diff --git a/rtgui/editwindow.cc b/rtgui/editwindow.cc index ac4d9d24e..d2ea0f8a2 100644 --- a/rtgui/editwindow.cc +++ b/rtgui/editwindow.cc @@ -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); diff --git a/rtgui/shcselector.cc b/rtgui/shcselector.cc index 2011271fe..504c209f7 100644 --- a/rtgui/shcselector.cc +++ b/rtgui/shcselector.cc @@ -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(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(fontSize) * fontScale; // px + const double fontSize = static_cast(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(Pango::SCALE)); + fontd.set_absolute_size (fontSize * static_cast(Pango::SCALE)); context->set_font_description (fontd); Glib::RefPtr layout = create_pango_layout(Glib::ustring::format(std::setprecision(2), positions[i]));