SearchEntry: replace the ID with a style class

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

https://bugzilla.gnome.org/show_bug.cgi?id=733813
This commit is contained in:
Giovanni Campagna 2014-08-01 10:56:50 +02:00
parent 926177785d
commit 3842981c35
2 changed files with 12 additions and 12 deletions

View File

@ -478,7 +478,7 @@ StScrollBar StButton#vhandle:active {
/* Common radii */ /* Common radii */
#searchEntry, .search-entry,
.modal-dialog-button, .modal-dialog-button,
.notification-button, .notification-button,
.hotplug-notification-item, .hotplug-notification-item,
@ -500,7 +500,7 @@ StScrollBar StButton#vhandle:active {
/* Entries */ /* Entries */
#searchEntry, .search-entry,
.login-dialog StEntry, .login-dialog StEntry,
.notification StEntry, .notification StEntry,
.modal-dialog StEntry { .modal-dialog StEntry {
@ -512,7 +512,7 @@ StScrollBar StButton#vhandle:active {
padding: 4px 12px; padding: 4px 12px;
} }
#searchEntry, .search-entry,
.login-dialog StEntry, .login-dialog StEntry,
.run-dialog-entry, .run-dialog-entry,
.notification StEntry { .notification StEntry {
@ -524,8 +524,8 @@ StScrollBar StButton#vhandle:active {
box-shadow: inset 0px 2px 4px rgba(0,0,0,0.6); box-shadow: inset 0px 2px 4px rgba(0,0,0,0.6);
} }
#searchEntry:focus, .search-entry:focus,
#searchEntry:hover, .search-entry:hover,
.login-dialog StEntry:focus, .login-dialog StEntry:focus,
.notification StEntry:focus, .notification StEntry:focus,
.modal-dialog StEntry { .modal-dialog StEntry {
@ -542,18 +542,18 @@ StScrollBar StButton#vhandle:active {
border: 2px solid #3465a4; border: 2px solid #3465a4;
} }
#searchEntry { .search-entry {
border-color: rgba(245,245,245,0.3); border-color: rgba(245,245,245,0.3);
color: rgb(192, 192, 192); color: rgb(192, 192, 192);
caret-color: rgb(192, 192, 192); caret-color: rgb(192, 192, 192);
} }
#searchEntry:hover { .search-entry:hover {
color: rgb(128, 128, 128); color: rgb(128, 128, 128);
caret-color: rgb(128, 128, 128); caret-color: rgb(128, 128, 128);
} }
#searchEntry:focus { .search-entry:focus {
color: rgb(64, 64, 64); color: rgb(64, 64, 64);
caret-color: rgb(64, 64, 64); caret-color: rgb(64, 64, 64);
font-weight: bold; font-weight: bold;
@ -917,7 +917,7 @@ StScrollBar StButton#vhandle:active {
/* Search Box */ /* Search Box */
#searchEntry { .search-entry {
width: 320px; width: 320px;
} }
@ -926,8 +926,8 @@ StScrollBar StButton#vhandle:active {
color: #c0c0c0; color: #c0c0c0;
} }
#searchEntry:hover .search-entry-icon, .search-entry:hover .search-entry-icon,
#searchEntry:focus .search-entry-icon { .search-entry:focus .search-entry-icon {
color: #8d8f8a; color: #8d8f8a;
} }

View File

@ -242,7 +242,7 @@ const Overview = new Lang.Class({
opacity: 0 }); opacity: 0 });
this._overview.add_actor(this._panelGhost); this._overview.add_actor(this._panelGhost);
this._searchEntry = new St.Entry({ name: 'searchEntry', this._searchEntry = new St.Entry({ style_class: 'search-entry',
/* Translators: this is the text displayed /* Translators: this is the text displayed
in the search entry when no search is in the search entry when no search is
active; it should not exceed ~30 active; it should not exceed ~30