extension: add support for menu button label#120
Open
Prarambha369 wants to merge 1 commit into
Open
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a configurable text label next to the Logo Menu button icon in the GNOME top panel, controlled via new GSettings keys and surfaced in the Libadwaita preferences UI (addresses #83).
Changes:
- Introduces new GSettings keys to toggle the label and set its text.
- Updates the preferences UI to expose the new toggle + text entry.
- Updates the panel button implementation and CSS to render the label beside the icon.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
stylesheet.css |
Adds a .menu-button-label class to space the label from the icon. |
schemas/org.gnome.shell.extensions.logo-menu.gschema.xml |
Adds settings for enabling the label and configuring its text. |
PrefsLib/adw.js |
Adds new preferences rows (switch + entry) bound to the new settings keys. |
extension.js |
Renders a St.Label next to the menu icon and updates it on settings changes. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+216
to
+220
| // Show Button Label toggle | ||
| const showLabelRow = new Adw.SwitchRow({ | ||
| title: _('Show Button Label'), | ||
| subtitle: _('Display a text label next to the icon in the top panel.'), | ||
| }); |
| title: _('Button Label Text'), | ||
| }); | ||
| this._settings.bind('menu-button-label-text', labelTextRow, | ||
| 'text', Gio.SettingsBindFlags.DEFAULT); |
Comment on lines
+39
to
+47
| this.label = new St.Label({ | ||
| text: '', | ||
| y_align: Clutter.ActorAlign.CENTER, | ||
| style_class: 'menu-button-label', | ||
| }); | ||
|
|
||
| this._buttonBox = new St.BoxLayout({ | ||
| style_class: 'panel-status-menu-box', | ||
| }); |
|
|
||
| <key type="s" name="menu-button-label-text"> | ||
| <default>""</default> | ||
| <summary>Menu button label text</summary> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
feat: add support for menu button label
Added the ability to show a customizable text label next to the menu button icon in the top panel.
Closes #83