Gradience/data/ui/preset_row.blp

204 lines
4.2 KiB
Text

using Gtk 4.0;
using Adw 1;
// Popover pop_actions {
// styles [
// "menu",
// ]
// Box {
// orientation: vertical;
// margin-top: 6;
// margin-bottom: 6;
// margin-start: 6;
// margin-end: 6;
// Button share_button {
// valign: center;
// label: _("Share preset");
// tooltip-text: _("Share Preset");
// styles ["flat"]
// }
// Separator {
// }
// .GtkModelButton btn_report {
// text: _("Report an Issue…");
// }
// }
// }
template $GradiencePresetRow : Adw.ExpanderRow {
[action]
Button star_button {
valign: center;
clicked => $on_star_button_clicked();
styles ["flat"]
}
[action]
Stack value_stack {
valign: center;
hhomogeneous: false;
interpolate-size: true;
transition-type: crossfade;
Button apply_button {
valign: center;
icon-name: "checkmark-symbolic";
tooltip-text: _("Apply Preset");
clicked => $on_apply_button_clicked();
styles ["flat"]
}
Entry name_entry {
text: "Name";
changed => $on_name_entry_changed();
}
}
[action]
ToggleButton name_entry_toggle {
valign: center;
icon-name: "document-edit-symbolic";
tooltip-text: _("Rename Preset");
toggled => $on_name_entry_toggled();
styles ["flat"]
}
// [action]
// MenuButton {
// valign: center;
// popover: pop_actions;
// icon-name: "view-more-symbolic";
// tooltip-text: _("More Options");
// styles ["flat"]
// }
Adw.ActionRow description {
title: _("Description");
subtitle: _("This preset has no description.");
}
Adw.ActionRow {
[prefix]
Gtk.Box badge_list {
spacing: 6;
margin-start: 6;
margin-end: 6;
Label no_badges {
valign: center;
label: _("No Badges");
styles ["tag", "caption"]
}
}
[suffix]
Button report_button {
valign: center;
icon-name: "bug-symbolic";
tooltip-text: _("Report an Issue");
clicked => $on_report_button_clicked();
}
[suffix]
Button remove_button {
valign: center;
label: _("Remove preset");
tooltip-text: _("Remove Preset");
clicked => $on_remove_button_clicked();
styles ["destructive-action"]
}
}
//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"]
// }
// }
//
//
// }
//}
}