screenshot: Add tooltip to the "Capture" button

Fixes https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/5448

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2654>
This commit is contained in:
Automeris naranja 2023-03-02 18:50:36 -03:00 committed by Automeris naranja
parent fb33b59306
commit bac403c409

View File

@ -1254,6 +1254,13 @@ var ScreenshotUI = GObject.registerClass({
this._captureButton.set_child(new St.Widget({
style_class: 'screenshot-ui-capture-button-circle',
}));
this.add_child(new Tooltip(this._captureButton, {
/* Translators: since this string refers to an action,
it needs to be phrased as a verb. */
text: _('Capture'),
style_class: 'screenshot-ui-tooltip',
visible: false,
}));
this._captureButton.connect('clicked',
this._onCaptureButtonClicked.bind(this));
this._bottomRowContainer.add_child(this._captureButton);