After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 733813 - Style the search entry using a class
Style the search entry using a class
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: st
unspecified
Other Linux
: Normal major
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2014-07-27 11:12 UTC by Ian
Modified: 2014-08-19 13:30 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
SearchEntry: replace the ID with a style class (3.06 KB, patch)
2014-08-01 08:58 UTC, Giovanni Campagna
committed Details | Review

Description Ian 2014-07-27 11:12:38 UTC
Hello!
The current implementation of the overview search bar is styled by ID (#searchEntry on gnome-shell.css). It should be styled using a class (maybe .searchEntry ?), to allow extension developers to grab the style of it.
In the way it is now, the developer has to 1) duplicate all the CSS for #searchEntry to its stylesheet.css file (ie, hardcode the default theme on its extension) or 2) give to its search entry the same ID as the theme (but we all know that an ID must belong to only one element).
Cheers, Ian.
Comment 1 Giovanni Campagna 2014-08-01 08:58:22 UTC
Created attachment 282240 [details] [review]
SearchEntry: replace the ID with a style class

This way extension authors can create entries that look and feel
like the overview search entry.

You can actually have two actors with the same name, but ok,
it's easy enough to fix this.
Comment 2 Rui Matos 2014-08-02 14:48:03 UTC
Review of attachment 282240 [details] [review]:

Looks fine

::: js/ui/overview.js
@@ +243,3 @@
         this._overview.add_actor(this._panelGhost);
 
+        this._searchEntry = new St.Entry({ style_class: 'search-entry',

The name could be kept here. No big deal though
Comment 3 Giovanni Campagna 2014-08-19 13:30:00 UTC
Attachment 282240 [details] pushed as 3842981 - SearchEntry: replace the ID with a style class