mirror of
https://github.com/YGGverse/Yoda.git
synced 2025-01-30 21:14:14 +00:00
use local object
This commit is contained in:
parent
bdf33f1086
commit
0bf1a6041a
@ -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
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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…
x
Reference in New Issue
Block a user