mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-08-02 14:57:31 +03:00
gtk: new approach to reveal/hide buttons
This commit is contained in:
@ -14,28 +14,7 @@ Adw.AlertDialog clipboard_confirmation_window {
|
|||||||
default-response: "cancel";
|
default-response: "cancel";
|
||||||
close-response: "cancel";
|
close-response: "cancel";
|
||||||
|
|
||||||
extra-child: Box {
|
extra-child: Overlay {
|
||||||
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");
|
|
||||||
}
|
|
||||||
|
|
||||||
ScrolledWindow text_view_scroll {
|
ScrolledWindow text_view_scroll {
|
||||||
width-request: 500;
|
width-request: 500;
|
||||||
height-request: 250;
|
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";
|
default-response: "cancel";
|
||||||
close-response: "cancel";
|
close-response: "cancel";
|
||||||
|
|
||||||
extra-child: Box {
|
extra-child: Overlay {
|
||||||
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");
|
|
||||||
}
|
|
||||||
|
|
||||||
ScrolledWindow text_view_scroll {
|
ScrolledWindow text_view_scroll {
|
||||||
width-request: 500;
|
width-request: 500;
|
||||||
height-request: 250;
|
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";
|
default-response: "cancel";
|
||||||
close-response: "cancel";
|
close-response: "cancel";
|
||||||
|
|
||||||
extra-child: Box {
|
extra-child: Overlay {
|
||||||
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");
|
|
||||||
}
|
|
||||||
|
|
||||||
ScrolledWindow text_view_scroll {
|
ScrolledWindow text_view_scroll {
|
||||||
width-request: 500;
|
width-request: 500;
|
||||||
height-request: 250;
|
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";
|
||||||
|
}
|
||||||
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user