projects
/
dana
/
openbox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
aca8327
)
add osd border stuff
author
Dana Jansens
<danakj@orodu.net>
Tue, 5 Jun 2007 15:57:27 +0000
(15:57 +0000)
committer
Dana Jansens
<danakj@orodu.net>
Tue, 5 Jun 2007 15:57:27 +0000
(15:57 +0000)
data/themerc.xsd
patch
|
blob
|
history
openbox/focus_cycle_popup.c
patch
|
blob
|
history
openbox/popup.c
patch
|
blob
|
history
render/theme.c
patch
|
blob
|
history
render/theme.h
patch
|
blob
|
history
tools/themetoxml/themetoxml.c
patch
|
blob
|
history
diff --git
a/data/themerc.xsd
b/data/themerc.xsd
index
eb7bd7d
..
40b036a
100644
(file)
--- a/
data/themerc.xsd
+++ b/
data/themerc.xsd
@@
-137,6
+137,7
@@
<xs:complexType name="allosd">
<xs:all>
<xs:complexType name="allosd">
<xs:all>
+ <xs:element name="border" type="obt:color" minOccurs="0"/>
<xs:element name="label" type="obt:textarea" minOccurs="0"/>
<xs:element name="background" type="obt:area" minOccurs="0"/>
<xs:element name="hilight" type="obt:area" minOccurs="0"/>
<xs:element name="label" type="obt:textarea" minOccurs="0"/>
<xs:element name="background" type="obt:area" minOccurs="0"/>
<xs:element name="hilight" type="obt:area" minOccurs="0"/>
@@
-157,12
+158,19
@@
</xs:all>
</xs:complexType>
</xs:all>
</xs:complexType>
+ <xs:complexType name="osdDimensions">
+ <xs:all>
+ <xs:element name="borderwidth" type="xs:integer" minOccurs="0"/>
+ </xs:all>
+ </xs:complexType>
+
<xs:complexType name="themeDimensions">
<xs:all>
<xs:element name="padding" type="obt:point" minOccurs="0"/>
<xs:element name="handle" type="xs:integer" minOccurs="0"/>
<xs:element name="window" type="obt:windowDimensions" minOccurs="0"/>
<xs:element name="menu" type="obt:menuDimensions" minOccurs="0"/>
<xs:complexType name="themeDimensions">
<xs:all>
<xs:element name="padding" type="obt:point" minOccurs="0"/>
<xs:element name="handle" type="xs:integer" minOccurs="0"/>
<xs:element name="window" type="obt:windowDimensions" minOccurs="0"/>
<xs:element name="menu" type="obt:menuDimensions" minOccurs="0"/>
+ <xs:element name="osd" type="obt:osdDimensions" minOccurs="0"/>
</xs:all>
</xs:complexType>
</xs:all>
</xs:complexType>
diff --git
a/openbox/focus_cycle_popup.c
b/openbox/focus_cycle_popup.c
index
015330b
..
8ae4e7e
100644
(file)
--- a/
openbox/focus_cycle_popup.c
+++ b/
openbox/focus_cycle_popup.c
@@
-112,9
+112,9
@@
void focus_cycle_popup_startup(gboolean reconfig)
popup.a_bg->texture[0].type = RR_TEXTURE_RGBA;
attrib.override_redirect = True;
popup.a_bg->texture[0].type = RR_TEXTURE_RGBA;
attrib.override_redirect = True;
- attrib.border_pixel=RrColorPixel(ob_rr_theme->
frame_focuse
d_border_color);
+ attrib.border_pixel=RrColorPixel(ob_rr_theme->
os
d_border_color);
popup.bg = create_window(RootWindow(ob_display, ob_screen),
popup.bg = create_window(RootWindow(ob_display, ob_screen),
- ob_rr_theme->
f
bwidth,
+ ob_rr_theme->
o
bwidth,
CWOverrideRedirect | CWBorderPixel, &attrib);
popup.text = create_window(popup.bg, 0, 0, NULL);
CWOverrideRedirect | CWBorderPixel, &attrib);
popup.text = create_window(popup.bg, 0, 0, NULL);
@@
-298,9
+298,9
@@
static void popup_render(ObFocusCyclePopup *p, const ObClient *c)
/* find the position for the popup (include the outer borders) */
x = screen_area->x + (screen_area->width -
/* find the position for the popup (include the outer borders) */
x = screen_area->x + (screen_area->width -
- (w + ob_rr_theme->
f
bwidth * 2)) / 2;
+ (w + ob_rr_theme->
o
bwidth * 2)) / 2;
y = screen_area->y + (screen_area->height -
y = screen_area->y + (screen_area->height -
- (h + ob_rr_theme->
f
bwidth * 2)) / 2;
+ (h + ob_rr_theme->
o
bwidth * 2)) / 2;
/* get the dimensions of the target hilite texture */
rgbax = ml;
/* get the dimensions of the target hilite texture */
rgbax = ml;
diff --git
a/openbox/popup.c
b/openbox/popup.c
index
86d4fb4
..
6099edc
100644
(file)
--- a/
openbox/popup.c
+++ b/
openbox/popup.c
@@
-51,9
+51,9
@@
ObPopup *popup_new()
0, 0, 1, 1, 0, RrDepth(ob_rr_inst),
InputOutput, RrVisual(ob_rr_inst), 0, NULL);
0, 0, 1, 1, 0, RrDepth(ob_rr_inst),
InputOutput, RrVisual(ob_rr_inst), 0, NULL);
- XSetWindowBorderWidth(ob_display, self->bg, ob_rr_theme->
f
bwidth);
+ XSetWindowBorderWidth(ob_display, self->bg, ob_rr_theme->
o
bwidth);
XSetWindowBorder(ob_display, self->bg,
XSetWindowBorder(ob_display, self->bg,
- RrColorPixel(ob_rr_theme->
frame_focuse
d_border_color));
+ RrColorPixel(ob_rr_theme->
os
d_border_color));
XMapWindow(ob_display, self->text);
XMapWindow(ob_display, self->text);
@@
-355,7
+355,7
@@
static void pager_popup_draw_icon(gint px, gint py, gint w, gint h,
gint eachw, eachh;
const guint cols = screen_desktop_layout.columns;
const guint rows = screen_desktop_layout.rows;
gint eachw, eachh;
const guint cols = screen_desktop_layout.columns;
const guint rows = screen_desktop_layout.rows;
- const gint linewidth = ob_rr_theme->
f
bwidth;
+ const gint linewidth = ob_rr_theme->
o
bwidth;
eachw = (w - ((cols + 1) * linewidth)) / cols;
eachh = (h - ((rows + 1) * linewidth)) / rows;
eachw = (w - ((cols + 1) * linewidth)) / cols;
eachh = (h - ((rows + 1) * linewidth)) / rows;
@@
-500,9
+500,9
@@
void pager_popup_delay_show(ObPagerPopup *self, gulong usec,
XSetWindowAttributes attr;
attr.border_pixel =
XSetWindowAttributes attr;
attr.border_pixel =
- RrColorPixel(ob_rr_theme->
frame_focuse
d_border_color);
+ RrColorPixel(ob_rr_theme->
os
d_border_color);
self->wins[i] = XCreateWindow(ob_display, self->popup->bg,
self->wins[i] = XCreateWindow(ob_display, self->popup->bg,
- 0, 0, 1, 1, ob_rr_theme->
f
bwidth,
+ 0, 0, 1, 1, ob_rr_theme->
o
bwidth,
RrDepth(ob_rr_inst), InputOutput,
RrVisual(ob_rr_inst), CWBorderPixel,
&attr);
RrDepth(ob_rr_inst), InputOutput,
RrVisual(ob_rr_inst), CWBorderPixel,
&attr);
diff --git
a/render/theme.c
b/render/theme.c
index
15b7e3c
..
4aef833
100644
(file)
--- a/
render/theme.c
+++ b/
render/theme.c
@@
-213,10
+213,13
@@
RrTheme* RrThemeNew(const RrInstance *inst, const gchar *name,
theme->fbwidth = 1;
/* menu border width inherits from frame border width */
theme->fbwidth = 1;
/* menu border width inherits from frame border width */
- if (!FIND(int, L("dimensions","menu","border"),
- &theme->mbwidth, 0, 100))
+ if (!FIND(int, L("dimensions","menu","border"), &theme->mbwidth, 0, 100))
theme->mbwidth = theme->fbwidth;
theme->mbwidth = theme->fbwidth;
+ /* osd border width inherits from frame border width */
+ if (!FIND(int, L("dimensions","osd","border"), &theme->obwidth, 0, 100))
+ theme->obwidth = theme->fbwidth;
+
if (!FIND(point, L("dimensions","window","clientpadding"),
&theme->cbwidthx, &theme->cbwidthy, 0, 100, 0, 100))
theme->cbwidthx = theme->cbwidthy = 1;
if (!FIND(point, L("dimensions","window","clientpadding"),
&theme->cbwidthx, &theme->cbwidthy, 0, 100, 0, 100))
theme->cbwidthx = theme->cbwidthy = 1;
@@
-251,13
+254,19
@@
RrTheme* RrThemeNew(const RrInstance *inst, const gchar *name,
theme->frame_unfocused_border_color->b);
/* menu border color inherits from frame focused border color */
theme->frame_unfocused_border_color->b);
/* menu border color inherits from frame focused border color */
- if (!FIND(color, L("menu","border"),
- &theme->menu_border_color, NULL))
+ if (!FIND(color, L("menu","border"), &theme->menu_border_color, NULL))
theme->menu_border_color =
RrColorNew(inst,
theme->frame_focused_border_color->r,
theme->frame_focused_border_color->g,
theme->frame_focused_border_color->b);
theme->menu_border_color =
RrColorNew(inst,
theme->frame_focused_border_color->r,
theme->frame_focused_border_color->g,
theme->frame_focused_border_color->b);
+ /* osd border color inherits from frame focused border color */
+ if (!FIND(color, L("osd","border"), &theme->osd_border_color, NULL))
+ theme->osd_border_color =
+ RrColorNew(inst,
+ theme->frame_focused_border_color->r,
+ theme->frame_focused_border_color->g,
+ theme->frame_focused_border_color->b);
if (!FIND(color, L("window","active","clientpadding"),
&theme->cb_focused_color, NULL))
theme->cb_focused_color = RrColorNew(inst, 255, 255, 255);
if (!FIND(color, L("window","active","clientpadding"),
&theme->cb_focused_color, NULL))
theme->cb_focused_color = RrColorNew(inst, 255, 255, 255);
@@
-1238,6
+1247,7
@@
void RrThemeFree(RrTheme *theme)
g_free(theme->name);
RrColorFree(theme->menu_border_color);
g_free(theme->name);
RrColorFree(theme->menu_border_color);
+ RrColorFree(theme->osd_border_color);
RrColorFree(theme->frame_focused_border_color);
RrColorFree(theme->frame_unfocused_border_color);
RrColorFree(theme->title_separator_focused_color);
RrColorFree(theme->frame_focused_border_color);
RrColorFree(theme->frame_unfocused_border_color);
RrColorFree(theme->title_separator_focused_color);
diff --git
a/render/theme.h
b/render/theme.h
index
e02a69e
..
2c35284
100644
(file)
--- a/
render/theme.h
+++ b/
render/theme.h
@@
-42,6
+42,7
@@
struct _RrTheme {
gint handle_height;
gint fbwidth; /*!< frame border width */
gint mbwidth; /*!< menu border width */
gint handle_height;
gint fbwidth; /*!< frame border width */
gint mbwidth; /*!< menu border width */
+ gint obwidth; /*!< osd border width */
gint cbwidthx;
gint cbwidthy;
gint menu_overlap;
gint cbwidthx;
gint cbwidthy;
gint menu_overlap;
@@
-58,6
+59,7
@@
struct _RrTheme {
/* style settings - colors */
RrColor *menu_border_color;
/* style settings - colors */
RrColor *menu_border_color;
+ RrColor *osd_border_color;
RrColor *frame_focused_border_color;
RrColor *frame_unfocused_border_color;
RrColor *title_separator_focused_color;
RrColor *frame_focused_border_color;
RrColor *frame_unfocused_border_color;
RrColor *title_separator_focused_color;
diff --git
a/tools/themetoxml/themetoxml.c
b/tools/themetoxml/themetoxml.c
index
8e3ce40
..
5c7ac8a
100644
(file)
--- a/
tools/themetoxml/themetoxml.c
+++ b/
tools/themetoxml/themetoxml.c
@@
-342,12
+342,16
@@
int main(int argc, char **argv)
if (read_int(db, "borderWidth", &i)) {
CONT3("dimensions", "window", "border", NUM(i));
CONT3("dimensions", "menu", "border", NUM(i));
if (read_int(db, "borderWidth", &i)) {
CONT3("dimensions", "window", "border", NUM(i));
CONT3("dimensions", "menu", "border", NUM(i));
+ CONT3("dimensions", "osd", "border", NUM(i));
} else if (read_int(db, "border.width", &i)) {
CONT3("dimensions", "window", "border", NUM(i));
CONT3("dimensions", "menu", "border", NUM(i));
} else if (read_int(db, "border.width", &i)) {
CONT3("dimensions", "window", "border", NUM(i));
CONT3("dimensions", "menu", "border", NUM(i));
+ CONT3("dimensions", "osd", "border", NUM(i));
}
if (read_int(db, "menu.border.width", &i))
CONT3("dimensions", "menu", "border", NUM(i));
}
if (read_int(db, "menu.border.width", &i))
CONT3("dimensions", "menu", "border", NUM(i));
+ if (read_int(db, "osd.border.width", &i))
+ CONT3("dimensions", "osd", "border", NUM(i));
if (read_color(db, "border.color", &i, &j, &k)) {
COLOR3("window", "active", "border", i, j, k, 255);
if (read_color(db, "border.color", &i, &j, &k)) {
COLOR3("window", "active", "border", i, j, k, 255);