Add hidpi support for threshold selector and curves

This commit is contained in:
Pandagrapher
2022-12-25 15:35:25 +01:00
parent 3c348599dc
commit c48531448e
15 changed files with 302 additions and 566 deletions

View File

@@ -21,7 +21,6 @@
#include <iomanip>
#include "coloredbar.h"
#include "guiutils.h"
#include "../rtengine/procparams.h"
@@ -61,7 +60,7 @@ public:
* have to provide through the ThresholdCurveProvider interface
*
*/
class ThresholdSelector : public Gtk::DrawingArea, public BackBuffer
class ThresholdSelector : public Gtk::DrawingArea
{
public:
@@ -109,16 +108,20 @@ protected:
void findSecondaryMovedCursor(guint state);
void findBoundaries(double &min, double &max);
double to01(ThreshCursorId cursorId);
// Internal drawing functions
void updateTooltip();
void updateBackBuffer();
void updateDrawingArea (const ::Cairo::RefPtr< Cairo::Context> &cr);
// GtkDrawingArea override functions
void on_realize () override;
bool on_draw(const ::Cairo::RefPtr< Cairo::Context> &cr) override;
Gtk::SizeRequestMode get_request_mode_vfunc () const override;
void get_preferred_height_vfunc (int& minimum_height, int& natural_height) const final;
void get_preferred_width_vfunc (int &minimum_width, int &natural_width) const final;
void get_preferred_height_for_width_vfunc (int width, int &minimum_height, int &natural_height) const final;
void get_preferred_width_for_height_vfunc (int height, int &minimum_width, int &natural_width) const final;
void on_realize () override;
bool on_draw(const ::Cairo::RefPtr< Cairo::Context> &cr) override;
bool on_button_press_event (GdkEventButton* event) override;
bool on_button_release_event (GdkEventButton* event) override;
bool on_motion_notify_event (GdkEventMotion* event) override;