Skip to content

Commit ac33cf9

Browse files
committed
port: Menu Button
1 parent 51a24d2 commit ac33cf9

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

src/Menu Button/main.ts

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
1-
const circular_switch = workbench.builder.get_object("circular_switch");
2-
const secondary_button = workbench.builder.get_object("secondary");
1+
import Adw from "gi://Adw";
2+
import Gtk from "gi://Gtk?version=4.0";
3+
4+
const circular_switch = workbench.builder.get_object<Adw.SwitchRow>(
5+
"circular_switch",
6+
);
7+
const secondary_button = workbench.builder.get_object<Gtk.MenuButton>(
8+
"secondary",
9+
);
310

411
circular_switch.connect("notify::active", () => {
512
if (circular_switch.active) {

0 commit comments

Comments
 (0)