[gnome-contacts] Better styling of edit entries
- From: Alexander Larsson <alexl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-contacts] Better styling of edit entries
- Date: Wed, 18 Jan 2012 19:45:40 +0000 (UTC)
commit e030f7dad1649c97d76d2d2fcf1e6bfe43e96cd6
Author: Alexander Larsson <alexl redhat com>
Date: Wed Jan 18 20:45:27 2012 +0100
Better styling of edit entries
data/gnome-contacts.css | 9 +++++++--
src/contacts-contact-pane.vala | 8 ++++++--
2 files changed, 13 insertions(+), 4 deletions(-)
---
diff --git a/data/gnome-contacts.css b/data/gnome-contacts.css
index ccfa619..2bcebd5 100644
--- a/data/gnome-contacts.css
+++ b/data/gnome-contacts.css
@@ -39,8 +39,6 @@ ContactsWindow .sidebar.view {
background-color: #ebebeb;
}
-
-
.contact-button:active {
border-color: #000000;
border-image: none;
@@ -53,6 +51,13 @@ ContactsWindow .sidebar.view {
border-style: solid;
border-color: #bbbeb7;
background-image: none;
+ background-color: #ffffff;
+}
+
+.contact-entry:selected,
+.contact-entry:selected:focus {
+ background-color: @theme_selected_bg_color;
+ color: @theme_selected_fg_color;
}
.contact-entry.contact-postal-entry {
diff --git a/src/contacts-contact-pane.vala b/src/contacts-contact-pane.vala
index 4e0058a..9579f6f 100644
--- a/src/contacts-contact-pane.vala
+++ b/src/contacts-contact-pane.vala
@@ -277,6 +277,7 @@ public class Contacts.FieldRow : Contacts.Row {
public void pack_entry_detail_combo (string text, AbstractFieldDetails detail, TypeSet type_set, out Entry entry, out TypeCombo combo) {
entry = new Entry ();
+ entry.get_style_context ().add_class ("contact-entry");
entry.set_text (text);
entry.set_hexpand (true);
entry.set_halign (Align.FILL);
@@ -286,6 +287,7 @@ public class Contacts.FieldRow : Contacts.Row {
public Entry pack_entry (string s) {
var e = new Entry ();
+ e.get_style_context ().add_class ("contact-entry");
e.set_text (s);
e.set_halign (Align.FILL);
pack (e);
@@ -1045,6 +1047,7 @@ class Contacts.NoteFieldRow : DataFieldRow {
public override void pack_edit_widgets () {
text = new TextView ();
+ text.get_style_context ().add_class ("contact-entry");
text.set_hexpand (true);
text.set_vexpand (true);
var scrolled = new ScrolledWindow (null, null);
@@ -1153,8 +1156,7 @@ class Contacts.AddressFieldRow : DataFieldRow {
public override void pack_edit_widgets () {
- var grid = new Grid ();
- grid.set_orientation (Orientation.VERTICAL);
+ var grid = new Box (Orientation.VERTICAL, 0);
grid.set_hexpand (true);
grid.set_halign (Align.FILL);
@@ -1166,6 +1168,8 @@ class Contacts.AddressFieldRow : DataFieldRow {
if (postal_part != null)
entry[i].set_text (postal_part);
entry[i].set ("placeholder-text", Contact.postal_element_names[i]);
+ entry[i].get_style_context ().add_class ("contact-entry");
+ entry[i].get_style_context ().add_class ("contact-postal-entry");
grid.add (entry[i]);
setup_entry_for_edit (entry[i], i == 0);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]