Gradience/data/ui/preset_row.blp

221 lines
4.1 KiB
Text
Raw Normal View History

2022-08-22 13:48:27 +00:00
using Gtk 4.0;
using Adw 1;
2022-09-14 14:55:35 +00:00
Popover pop_actions {
styles [
"menu",
]
Box {
orientation: vertical;
margin-top: 6;
margin-bottom: 6;
margin-start: 6;
margin-end: 6;
Button remove_button {
valign: center;
label: _("Remove preset");
tooltip-text: _("Remove preset");
clicked => on_remove_button_clicked();
}
Separator {
}
.GtkModelButton btn_report {
text: _("Report an Issue…");
2022-09-14 14:55:35 +00:00
}
}
}
2022-09-15 18:38:54 +00:00
template GradiencePresetRow : Adw.ExpanderRow {
2022-09-16 15:54:20 +00:00
// [action]
// Button start_button {
// valign: center;
// icon-name: "star-filled-rounded-symbolic";
// styles [
// "flat",
// ]
// }
2022-09-14 14:55:35 +00:00
2022-08-22 13:48:27 +00:00
2022-09-15 18:38:54 +00:00
[action]
2022-09-14 14:55:35 +00:00
Stack value_stack {
valign: center;
hhomogeneous: false;
interpolate-size: true;
transition-type: crossfade;
Button apply_button {
2022-09-22 19:54:33 +00:00
valign: center;
icon-name: "checkmark-large-symbolic";
2022-09-22 19:54:33 +00:00
tooltip-text: _("Apply preset");
clicked => on_apply_button_clicked();
styles [
"flat",
]
2022-09-14 14:55:35 +00:00
}
Entry name_entry {
text: "Name";
changed => on_name_entry_changed();
}
}
2022-09-15 18:38:54 +00:00
[action]
2022-09-14 14:55:35 +00:00
ToggleButton name_entry_toggle {
valign: center;
icon-name: "document-edit-symbolic";
tooltip-text: _("Rename preset");
2022-09-14 14:55:35 +00:00
toggled => on_name_entry_toggled();
styles [
"flat",
]
}
2022-09-15 18:38:54 +00:00
[action]
2022-09-14 14:55:35 +00:00
MenuButton {
valign: center;
popover: pop_actions;
icon-name: "view-more-symbolic";
styles [
"flat",
]
}
2022-08-23 07:22:42 +00:00
2022-09-15 18:38:54 +00:00
Gtk.ListBoxRow {
activatable: false;
Gtk.Grid {
styles ["content"]
2022-09-16 16:06:04 +00:00
row-spacing: 15;
column-spacing: 15;
2022-09-15 18:38:54 +00:00
Gtk.Label {
styles ["dim-label"]
label: _("Description");
xalign: 0;
yalign: 0;
layout {
row: 0;
column: 0;
}
}
Gtk.Label description_label {
xalign: 0;
wrap-mode: word;
wrap: true;
selectable: true;
label: _("Sorry, but this preset don't have a description.");
2022-09-16 15:55:59 +00:00
2022-09-15 18:38:54 +00:00
layout {
row: 0;
column: 1;
}
}
}
}
2022-09-16 15:54:20 +00:00
//Gtk.ListBoxRow {
// activatable: false;
//
// Gtk.Grid {
// styles ["content"]
//
// row-spacing: 6;
// column-spacing: 6;
//
// Gtk.Label {
// styles ["dim-label"]
//
// valign: center;
// halign: center;
//
// label: _("By @GradienceTeam");
//
// xalign: 0;
// yalign: 0;
//
// layout {
// row: 0;
// column: 0;
// }
// }
//
//
// Box {
//
// layout {
// row: 0;
// column: 1;
// }
//
// orientation: horizontal;
// valign: center;
// spacing: 8;
//
// CheckButton light {
// name: "light";
// group: dark;
// active: true;
// styles ["variant"]
// }
//
// CheckButton dark {
// name: "dark";
// styles ["variant"]
// }
//
// Separator s {
// }
//
// CheckButton a {
// name: "red";
// active: true;
// styles ["variant"]
// }
//
// CheckButton b {
// name: "orange";
// group: a;
// styles ["variant"]
// }
//
// CheckButton c {
// name: "yellow";
// group: a;
// styles ["variant"]
// }
//
// CheckButton d {
// name: "green";
// group: a;
// styles ["variant"]
// }
//
// CheckButton e {
// name: "blue";
// group: a;
// styles ["variant"]
// }
// }
//
//
// }
//}
2022-09-15 18:38:54 +00:00
2022-08-22 13:48:27 +00:00
2022-08-23 10:11:32 +00:00
2022-08-22 13:48:27 +00:00
}