summaryrefslogtreecommitdiff
path: root/libs/gtkmm2ext/gtkmm2ext/pixfader.h
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2014-09-02 16:00:24 +0200
committerRobin Gareus <robin@gareus.org>2014-09-02 16:00:24 +0200
commitecf5d5f13754b9f5e9405c62402cc76dbe67e176 (patch)
tree7751fa13b51ae57021bd69ba358b72aa01e1edd9 /libs/gtkmm2ext/gtkmm2ext/pixfader.h
parent88df9c28a6472bdaad5e616bad00e50f6b2fda06 (diff)
tweak pixfader:
* update reserve so that round corners don't overlap * draw complete 1px outline * add API to hide/show the unity line * don't show unity line at either end * allow to shrink when the font-scaling changes
Diffstat (limited to 'libs/gtkmm2ext/gtkmm2ext/pixfader.h')
-rw-r--r--libs/gtkmm2ext/gtkmm2ext/pixfader.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/libs/gtkmm2ext/gtkmm2ext/pixfader.h b/libs/gtkmm2ext/gtkmm2ext/pixfader.h
index 0b450c25c3..0ec46a1c74 100644
--- a/libs/gtkmm2ext/gtkmm2ext/pixfader.h
+++ b/libs/gtkmm2ext/gtkmm2ext/pixfader.h
@@ -42,7 +42,8 @@ class LIBGTKMM2EXT_API PixFader : public Gtk::DrawingArea
sigc::signal<void> OnExpose;
void set_default_value (float);
- void set_text (const std::string&, bool centered = true);
+ void set_text (const std::string&, bool centered = true, bool expose = true);
+ void show_unity_line (bool yn);
protected:
Glib::RefPtr<Pango::Layout> _layout;
@@ -72,8 +73,8 @@ class LIBGTKMM2EXT_API PixFader : public Gtk::DrawingArea
};
private:
- int _span;
- int _girth;
+ int _span, _girth;
+ int _min_span, _min_girth;
int _orien;
cairo_pattern_t* _pattern;
bool _hovering;
@@ -85,6 +86,7 @@ class LIBGTKMM2EXT_API PixFader : public Gtk::DrawingArea
float _default_value;
int _unity_loc;
bool _centered_text;
+ bool _display_unity_line;
sigc::connection _parent_style_change;
Widget * _current_parent;