Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenjamin Berg <benjamin@sipsolutions.net>2007-09-28 19:05:50 (GMT)
committer Benjamin Berg <benjamin@sipsolutions.net>2007-09-28 19:05:50 (GMT)
commit8ec525b54a891a41c5d1a9c5b7c757eceb5d92f0 (patch)
tree43e5ed29b9122adb05949c885a5bbcb4b3611a15
parentcd0548850aedd254401275fae78de62bc9646648 (diff)
Changed the focus color on entries, and cut of the focus on comboboxentries as is already done on spinbuttons.
-rw-r--r--gtk/engine/sugar-style.c13
-rw-r--r--gtk/theme/gtkrc.em8
2 files changed, 9 insertions, 12 deletions
diff --git a/gtk/engine/sugar-style.c b/gtk/engine/sugar-style.c
index 207382b..e913744 100644
--- a/gtk/engine/sugar-style.c
+++ b/gtk/engine/sugar-style.c
@@ -219,14 +219,11 @@ sugar_style_draw_focus (GtkStyle *style,
if (!interior_focus) {
cr = sugar_cairo_create (window, area);
- if (HINT ("comboboxentry")) {
- if (DETAIL ("button")) {
- sugar_remove_corners (&info.corners, info.ltr ? EDGE_LEFT : EDGE_RIGHT);
- } else {
- sugar_remove_corners (&info.corners, info.ltr ? EDGE_RIGHT : EDGE_LEFT);
- }
- } else if (DETAIL ("entry") && HINT ("spinbutton")) {
- /* We need to fake the focus on the button separately. */
+ if (DETAIL ("button") && HINT ("comboboxentry")) {
+ sugar_remove_corners (&info.corners, info.ltr ? EDGE_LEFT : EDGE_RIGHT);
+ } else if (DETAIL ("entry") && (HINT ("spinbutton") || HINT ("comboboxentry"))) {
+ /* Focus for the entry of the combobox and spinbutton. The Combobox
+ * focus just disappears into nothingness ... */
info.cont_edges |= info.ltr ? EDGE_RIGHT : EDGE_LEFT;
sugar_remove_corners (&info.corners, info.cont_edges);
diff --git a/gtk/theme/gtkrc.em b/gtk/theme/gtkrc.em
index cf5781a..fc183a1 100644
--- a/gtk/theme/gtkrc.em
+++ b/gtk/theme/gtkrc.em
@@ -457,18 +457,18 @@ style "panel"
style "entry"
{
+ color["focus_line"] = $text_field_grey
${ entry_thickness = my_ceil(0.3 * (subcell_size*3.0/2.0 - thickness) + thickness) }
# small inner border and a large x/ythickness for entries
# to reduce the number of hacks needed :-)
- xthickness = $entry_thickness
- ythickness = $entry_thickness
+ xthickness = $(entry_thickness)
+ ythickness = $(entry_thickness)
+ GtkWidget::focus-line-width = 0
# This tries to get a height of exactly 45 pixel for the entry.
GtkEntry::inner-border = { $(max(subcell_size - entry_thickness, 0)), $(max(subcell_size - entry_thickness, 0)),
$(max(my_floor((3*subcell_size - font_height - entry_thickness*2)/2.0),0)), $(max(my_ceil((3*subcell_size - font_height - entry_thickness*2)/2.0), 0)) }
-
- GtkWidget::focus-line-width = 0
}
style "button"