Browse Source

use local object

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

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

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

Loading…
Cancel
Save