Skip to content

Commit ca2862b

Browse files
committed
detail-view: Add extension controls to UI
1 parent 0088fc0 commit ca2862b

File tree

5 files changed

+61
-4
lines changed

5 files changed

+61
-4
lines changed
Lines changed: 10 additions & 0 deletions
Loading

src/exm-detail-view.blp

Lines changed: 45 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -130,10 +130,51 @@ template $ExmDetailView : Adw.NavigationPage {
130130
}
131131
}
132132

133-
$ExmInstallButton ext_install {
134-
valign: center;
135-
halign: center;
136-
}
133+
Gtk.Stack ext_tools {
134+
Gtk.StackPage {
135+
child: Gtk.Box {
136+
137+
orientation: horizontal;
138+
spacing: 16;
139+
140+
Gtk.Box manage_tools {
141+
styles ["linked"]
142+
143+
Gtk.Button prefs_btn {
144+
icon-name: "settings-symbolic";
145+
valign: center;
146+
halign: center;
147+
148+
tooltip-text: _("Open extension preferences");
149+
}
150+
151+
Gtk.Button delete_btn {
152+
styles ["destructive-action"]
153+
154+
icon-name: "user-trash-symbolic";
155+
valign: center;
156+
halign: center;
157+
158+
tooltip-text: _("Remove the extension");
159+
}
160+
}
161+
162+
Gtk.Switch toggle_switch {
163+
valign: center;
164+
halign: center;
165+
166+
tooltip-text: _("Enable/disable the extension");
167+
}
168+
};
169+
}
170+
171+
Gtk.StackPage {
172+
child: .ExmInstallButton ext_install {
173+
valign: center;
174+
halign: center;
175+
};
176+
}
177+
}
137178
}
138179

139180
Gtk.Overlay ext_screenshot_container {

src/exm-extension-row.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -379,3 +379,4 @@ exm_extension_row_init (ExmExtensionRow *self)
379379

380380
gtk_widget_insert_action_group (GTK_WIDGET (self), "row", G_ACTION_GROUP (self->action_group));
381381
}
382+

src/exm-screenshot.blp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ template $ExmScreenshot : Gtk.Widget {
1818
name: "page_picture";
1919

2020
child: Gtk.Picture picture {
21+
styles ["screenshot"]
2122
valign: fill;
2223
halign: fill;
2324
};

src/style.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,3 +104,7 @@ progressbar.success text {
104104
color: @green_1;
105105
opacity: 0.8;
106106
}
107+
108+
.screenshot {
109+
background-color: rgba(0,0,0,0.2);
110+
}

0 commit comments

Comments
 (0)