Browse Source

use local object

CPP-GTK4
yggverse 2 months ago
parent
commit
0bf1a6041a
  1. 6
      src/app/browser/main/tab/label.cpp
  2. 2
      src/app/browser/main/tab/label.hpp

6
src/app/browser/main/tab/label.cpp

@ -10,14 +10,14 @@ Label::Label(
); );
// Setup label controller // Setup label controller
controller = Gtk::GestureClick::create(); auto GtkGestureClick_RefPtr = Gtk::GestureClick::create();
/* @TODO remove as default /* @TODO remove as default
controller->set_button( controller->set_button(
GDK_BUTTON_PRIMARY GDK_BUTTON_PRIMARY
);*/ );*/
controller->signal_pressed().connect( GtkGestureClick_RefPtr->signal_pressed().connect(
[this](int n, double x, double y) [this](int n, double x, double y)
{ {
if (n == 2) // double click if (n == 2) // double click
@ -30,7 +30,7 @@ Label::Label(
); );
add_controller( add_controller(
controller GtkGestureClick_RefPtr
); );
} }

2
src/app/browser/main/tab/label.hpp

@ -11,8 +11,6 @@ namespace app::browser::main::tab
{ {
class Label : public Gtk::Label class Label : public Gtk::Label
{ {
Glib::RefPtr<Gtk::GestureClick> controller;
public: public:
Label( Label(

Loading…
Cancel
Save