Enhance inspector window with scrolling and pinning

- 2D scrolling during 1:1 view (tested with mac trackpad)
- click to pin inspector window
- another click or ESC to hide inspector window
- 'z' or 'F' to switch to 1:1 view, 'f' to switch to scaled view
This commit is contained in:
rfranke
2020-01-04 18:35:15 +01:00
parent c3c382e56e
commit 6604ab1b7c
2 changed files with 75 additions and 2 deletions

View File

@@ -49,12 +49,16 @@ private:
InspectorBuffer* currImage;
bool scaled;
bool active;
bool pinned;
sigc::connection delayconn;
Glib::ustring next_image_path;
Gtk::Window window;
bool on_key_release(GdkEventKey *event);
bool on_button_press(GdkEventButton *event);
bool on_key_press(GdkEventKey *event);
bool on_scroll(GdkEventScroll *event);
bool on_draw(const ::Cairo::RefPtr< Cairo::Context> &cr) override;
void deleteBuffers();