gtk: new approach to reveal/hide buttons
parent
7123d4e055
commit
f71b294697
|
|
@ -14,28 +14,7 @@ Adw.AlertDialog clipboard_confirmation_window {
|
|||
default-response: "cancel";
|
||||
close-response: "cancel";
|
||||
|
||||
extra-child: Box {
|
||||
orientation: vertical;
|
||||
spacing: 12;
|
||||
|
||||
Button reveal_button {
|
||||
visible: false;
|
||||
|
||||
styles [
|
||||
"destructive-action"
|
||||
]
|
||||
|
||||
Adw.ButtonContent {
|
||||
label: _("Reveal Potentially Sensitive Content");
|
||||
icon-name: "dialog-warning-symbolic";
|
||||
}
|
||||
}
|
||||
|
||||
Button hide_button {
|
||||
visible: false;
|
||||
label: _("Hide Potentially Sensitive Content");
|
||||
}
|
||||
|
||||
extra-child: Overlay {
|
||||
ScrolledWindow text_view_scroll {
|
||||
width-request: 500;
|
||||
height-request: 250;
|
||||
|
|
@ -54,5 +33,39 @@ Adw.AlertDialog clipboard_confirmation_window {
|
|||
]
|
||||
}
|
||||
}
|
||||
|
||||
[overlay]
|
||||
Button reveal_button {
|
||||
visible: false;
|
||||
halign: end;
|
||||
valign: start;
|
||||
margin-end: 12;
|
||||
margin-top: 12;
|
||||
|
||||
styles [
|
||||
"destructive-action",
|
||||
]
|
||||
|
||||
Image {
|
||||
icon-name: "view-reveal-symbolic";
|
||||
}
|
||||
}
|
||||
|
||||
[overlay]
|
||||
Button hide_button {
|
||||
visible: false;
|
||||
halign: end;
|
||||
valign: start;
|
||||
margin-end: 12;
|
||||
margin-top: 12;
|
||||
|
||||
styles [
|
||||
"suggested-action",
|
||||
]
|
||||
|
||||
Image {
|
||||
icon-name: "view-conceal-symbolic";
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,28 +14,7 @@ Adw.AlertDialog clipboard_confirmation_window {
|
|||
default-response: "cancel";
|
||||
close-response: "cancel";
|
||||
|
||||
extra-child: Box {
|
||||
orientation: vertical;
|
||||
spacing: 12;
|
||||
|
||||
Button reveal_button {
|
||||
visible: false;
|
||||
|
||||
styles [
|
||||
"destructive-action"
|
||||
]
|
||||
|
||||
Adw.ButtonContent {
|
||||
label: _("Reveal Potentially Sensitive Content");
|
||||
icon-name: "dialog-warning-symbolic";
|
||||
}
|
||||
}
|
||||
|
||||
Button hide_button {
|
||||
visible: false;
|
||||
label: _("Hide Potentially Sensitive Content");
|
||||
}
|
||||
|
||||
extra-child: Overlay {
|
||||
ScrolledWindow text_view_scroll {
|
||||
width-request: 500;
|
||||
height-request: 250;
|
||||
|
|
@ -54,5 +33,39 @@ Adw.AlertDialog clipboard_confirmation_window {
|
|||
]
|
||||
}
|
||||
}
|
||||
|
||||
[overlay]
|
||||
Button reveal_button {
|
||||
visible: false;
|
||||
halign: end;
|
||||
valign: start;
|
||||
margin-end: 12;
|
||||
margin-top: 12;
|
||||
|
||||
styles [
|
||||
"destructive-action",
|
||||
]
|
||||
|
||||
Image {
|
||||
icon-name: "view-reveal-symbolic";
|
||||
}
|
||||
}
|
||||
|
||||
[overlay]
|
||||
Button hide_button {
|
||||
visible: false;
|
||||
halign: end;
|
||||
valign: start;
|
||||
margin-end: 12;
|
||||
margin-top: 12;
|
||||
|
||||
styles [
|
||||
"suggested-action",
|
||||
]
|
||||
|
||||
Image {
|
||||
icon-name: "view-conceal-symbolic";
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,28 +14,7 @@ Adw.AlertDialog clipboard_confirmation_window {
|
|||
default-response: "cancel";
|
||||
close-response: "cancel";
|
||||
|
||||
extra-child: Box {
|
||||
orientation: vertical;
|
||||
spacing: 12;
|
||||
|
||||
Button reveal_button {
|
||||
visible: false;
|
||||
|
||||
styles [
|
||||
"destructive-action"
|
||||
]
|
||||
|
||||
Adw.ButtonContent {
|
||||
label: _("Reveal Potentially Sensitive Content");
|
||||
icon-name: "dialog-warning-symbolic";
|
||||
}
|
||||
}
|
||||
|
||||
Button hide_button {
|
||||
visible: false;
|
||||
label: _("Hide Potentially Sensitive Content");
|
||||
}
|
||||
|
||||
extra-child: Overlay {
|
||||
ScrolledWindow text_view_scroll {
|
||||
width-request: 500;
|
||||
height-request: 250;
|
||||
|
|
@ -54,5 +33,39 @@ Adw.AlertDialog clipboard_confirmation_window {
|
|||
]
|
||||
}
|
||||
}
|
||||
|
||||
[overlay]
|
||||
Button reveal_button {
|
||||
visible: false;
|
||||
halign: end;
|
||||
valign: start;
|
||||
margin-end: 12;
|
||||
margin-top: 12;
|
||||
|
||||
styles [
|
||||
"destructive-action",
|
||||
]
|
||||
|
||||
Image {
|
||||
icon-name: "view-reveal-symbolic";
|
||||
}
|
||||
}
|
||||
|
||||
[overlay]
|
||||
Button hide_button {
|
||||
visible: false;
|
||||
halign: end;
|
||||
valign: start;
|
||||
margin-end: 12;
|
||||
margin-top: 12;
|
||||
|
||||
styles [
|
||||
"suggested-action",
|
||||
]
|
||||
|
||||
Image {
|
||||
icon-name: "view-conceal-symbolic";
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue