Merge branch 'm4/master'
This commit is contained in:
commit
d09fd3183e
11 changed files with 1251 additions and 1059 deletions
|
@ -86,6 +86,8 @@ obrender_libobrender_la_LIBADD = \
|
|||
$(XML_LIBS)
|
||||
obrender_libobrender_la_SOURCES = \
|
||||
gettext.h \
|
||||
obrender/button.h \
|
||||
obrender/button.c \
|
||||
obrender/color.h \
|
||||
obrender/color.c \
|
||||
obrender/font.h \
|
||||
|
|
117
obrender/button.c
Normal file
117
obrender/button.c
Normal file
|
@ -0,0 +1,117 @@
|
|||
#include "render.h"
|
||||
#include "button.h"
|
||||
#include "instance.h"
|
||||
#include "mask.h"
|
||||
|
||||
#include <X11/Xlib.h>
|
||||
#include <X11/Xutil.h>
|
||||
#include <string.h>
|
||||
|
||||
RrButton *RrButtonNew (const RrInstance *inst)
|
||||
{
|
||||
RrButton *out = NULL;
|
||||
|
||||
out = g_new(RrButton, 1);
|
||||
out->inst = inst;
|
||||
|
||||
/* no need to alloc colors, set them null (for freeing later) */
|
||||
out->focused_unpressed_color = NULL;
|
||||
out->unfocused_unpressed_color = NULL;
|
||||
out->focused_pressed_color = NULL;
|
||||
out->unfocused_pressed_color = NULL;
|
||||
out->disabled_focused_color = NULL;
|
||||
out->disabled_unfocused_color = NULL;
|
||||
out->hover_focused_color = NULL;
|
||||
out->hover_unfocused_color = NULL;
|
||||
out->toggled_hover_focused_color = NULL;
|
||||
out->toggled_hover_unfocused_color = NULL;
|
||||
out->toggled_focused_pressed_color = NULL;
|
||||
out->toggled_unfocused_pressed_color = NULL;
|
||||
out->toggled_focused_unpressed_color = NULL;
|
||||
out->toggled_unfocused_unpressed_color = NULL;
|
||||
|
||||
/* same with masks */
|
||||
out->mask = NULL;
|
||||
out->pressed_mask = NULL;
|
||||
out->disabled_mask = NULL;
|
||||
out->hover_mask = NULL;
|
||||
out->toggled_mask = NULL;
|
||||
out->toggled_hover_mask = NULL;
|
||||
out->toggled_pressed_mask = NULL;
|
||||
|
||||
/* allocate appearances */
|
||||
out->a_focused_unpressed = RrAppearanceNew(inst, 1);
|
||||
out->a_unfocused_unpressed = RrAppearanceNew(inst, 1);
|
||||
out->a_focused_pressed = RrAppearanceNew(inst, 1);
|
||||
out->a_unfocused_pressed = RrAppearanceNew(inst, 1);
|
||||
out->a_disabled_focused = RrAppearanceNew(inst, 1);
|
||||
out->a_disabled_unfocused = RrAppearanceNew(inst, 1);
|
||||
out->a_hover_focused = RrAppearanceNew(inst, 1);
|
||||
out->a_hover_unfocused = RrAppearanceNew(inst, 1);
|
||||
out->a_toggled_focused_unpressed = RrAppearanceNew(inst, 1);
|
||||
out->a_toggled_unfocused_unpressed = RrAppearanceNew(inst, 1);
|
||||
out->a_toggled_focused_pressed = RrAppearanceNew(inst, 1);
|
||||
out->a_toggled_unfocused_pressed = RrAppearanceNew(inst, 1);
|
||||
out->a_toggled_hover_focused = RrAppearanceNew(inst, 1);
|
||||
out->a_toggled_hover_unfocused = RrAppearanceNew(inst, 1);
|
||||
|
||||
return out;
|
||||
}
|
||||
|
||||
void RrButtonFree(RrButton *b)
|
||||
{
|
||||
/* colors */
|
||||
if (b->focused_unpressed_color)
|
||||
RrColorFree(b->focused_unpressed_color);
|
||||
if (b->unfocused_unpressed_color)
|
||||
RrColorFree(b->unfocused_unpressed_color);
|
||||
if (b->focused_pressed_color)
|
||||
RrColorFree(b->focused_pressed_color);
|
||||
if (b->unfocused_pressed_color)
|
||||
RrColorFree(b->unfocused_pressed_color);
|
||||
if (b->disabled_focused_color)
|
||||
RrColorFree(b->disabled_focused_color);
|
||||
if (b->disabled_unfocused_color)
|
||||
RrColorFree(b->disabled_unfocused_color);
|
||||
if (b->hover_focused_color)
|
||||
RrColorFree(b->hover_focused_color);
|
||||
if (b->hover_unfocused_color)
|
||||
RrColorFree(b->hover_unfocused_color);
|
||||
if (b->toggled_hover_focused_color)
|
||||
RrColorFree(b->toggled_hover_focused_color);
|
||||
if (b->toggled_hover_unfocused_color)
|
||||
RrColorFree(b->toggled_hover_unfocused_color);
|
||||
if (b->toggled_focused_pressed_color)
|
||||
RrColorFree(b->toggled_focused_pressed_color);
|
||||
if (b->toggled_unfocused_pressed_color)
|
||||
RrColorFree(b->toggled_unfocused_pressed_color);
|
||||
if (b->toggled_focused_unpressed_color)
|
||||
RrColorFree(b->toggled_focused_unpressed_color);
|
||||
if (b->toggled_unfocused_unpressed_color)
|
||||
RrColorFree(b->toggled_unfocused_unpressed_color);
|
||||
|
||||
/* masks */
|
||||
if (b->mask) RrPixmapMaskFree(b->mask);
|
||||
if (b->pressed_mask) RrPixmapMaskFree(b->pressed_mask);
|
||||
if (b->disabled_mask) RrPixmapMaskFree(b->disabled_mask);
|
||||
if (b->hover_mask) RrPixmapMaskFree(b->hover_mask);
|
||||
if (b->toggled_mask) RrPixmapMaskFree(b->toggled_mask);
|
||||
if (b->toggled_hover_mask) RrPixmapMaskFree(b->toggled_hover_mask);
|
||||
if (b->toggled_pressed_mask) RrPixmapMaskFree(b->toggled_pressed_mask);
|
||||
|
||||
/* appearances */
|
||||
RrAppearanceFree(b->a_focused_unpressed);
|
||||
RrAppearanceFree(b->a_unfocused_unpressed);
|
||||
RrAppearanceFree(b->a_focused_pressed);
|
||||
RrAppearanceFree(b->a_unfocused_pressed);
|
||||
RrAppearanceFree(b->a_disabled_focused);
|
||||
RrAppearanceFree(b->a_disabled_unfocused);
|
||||
RrAppearanceFree(b->a_hover_focused);
|
||||
RrAppearanceFree(b->a_hover_unfocused);
|
||||
RrAppearanceFree(b->a_toggled_focused_unpressed);
|
||||
RrAppearanceFree(b->a_toggled_unfocused_unpressed);
|
||||
RrAppearanceFree(b->a_toggled_focused_pressed);
|
||||
RrAppearanceFree(b->a_toggled_unfocused_pressed);
|
||||
RrAppearanceFree(b->a_toggled_hover_focused);
|
||||
RrAppearanceFree(b->a_toggled_hover_unfocused);
|
||||
}
|
11
obrender/button.h
Normal file
11
obrender/button.h
Normal file
|
@ -0,0 +1,11 @@
|
|||
#ifndef __button_h
|
||||
#define __button_h
|
||||
|
||||
#include "render.h"
|
||||
|
||||
#include <X11/Xlib.h>
|
||||
#include <X11/Xutil.h>
|
||||
#include <glib.h>
|
||||
|
||||
|
||||
#endif /* __button_h */
|
|
@ -101,6 +101,11 @@ RrColor *RrColorNew(const RrInstance *inst, gint r, gint g, gint b)
|
|||
return out;
|
||||
}
|
||||
|
||||
RrColor *RrColorCopy(RrColor* c)
|
||||
{
|
||||
return RrColorNew(c->inst, c->r, c->g, c->b);
|
||||
}
|
||||
|
||||
void RrColorFree(RrColor *c)
|
||||
{
|
||||
if (c) {
|
||||
|
|
|
@ -231,6 +231,8 @@ void RrAppearanceClearTextures(RrAppearance *a)
|
|||
memset(a->texture, 0, a->textures * sizeof(RrTexture));
|
||||
}
|
||||
|
||||
/* deep copy of orig, means reset ref to 1 on copy
|
||||
* and copy each thing memwise. */
|
||||
RrAppearance *RrAppearanceCopy(RrAppearance *orig)
|
||||
{
|
||||
RrSurface *spo, *spc;
|
||||
|
@ -316,6 +318,7 @@ RrAppearance *RrAppearanceCopy(RrAppearance *orig)
|
|||
return copy;
|
||||
}
|
||||
|
||||
/* now decrements ref counter, and frees only if ref <= 0 */
|
||||
void RrAppearanceFree(RrAppearance *a)
|
||||
{
|
||||
if (a) {
|
||||
|
|
|
@ -47,6 +47,7 @@ typedef struct _RrImage RrImage;
|
|||
typedef struct _RrImageSet RrImageSet;
|
||||
typedef struct _RrImagePic RrImagePic;
|
||||
typedef struct _RrImageCache RrImageCache;
|
||||
typedef struct _RrButton RrButton;
|
||||
|
||||
typedef guint32 RrPixel32; /* RGBA format */
|
||||
typedef guint16 RrPixel16;
|
||||
|
@ -221,7 +222,7 @@ struct _RrTexture {
|
|||
|
||||
struct _RrAppearance {
|
||||
const RrInstance *inst;
|
||||
|
||||
|
||||
RrSurface surface;
|
||||
gint textures;
|
||||
RrTexture *texture;
|
||||
|
@ -286,6 +287,52 @@ struct _RrImageSet
|
|||
gint n_resized;
|
||||
};
|
||||
|
||||
struct _RrButton {
|
||||
const RrInstance *inst;
|
||||
|
||||
/* colors */
|
||||
RrColor *focused_unpressed_color;
|
||||
RrColor *unfocused_unpressed_color;
|
||||
RrColor *focused_pressed_color;
|
||||
RrColor *unfocused_pressed_color;
|
||||
RrColor *disabled_focused_color;
|
||||
RrColor *disabled_unfocused_color;
|
||||
RrColor *hover_focused_color;
|
||||
RrColor *hover_unfocused_color;
|
||||
RrColor *toggled_hover_focused_color;
|
||||
RrColor *toggled_hover_unfocused_color;
|
||||
RrColor *toggled_focused_pressed_color;
|
||||
RrColor *toggled_unfocused_pressed_color;
|
||||
RrColor *toggled_focused_unpressed_color;
|
||||
RrColor *toggled_unfocused_unpressed_color;
|
||||
|
||||
/* masks */
|
||||
RrPixmapMask *mask;
|
||||
RrPixmapMask *pressed_mask;
|
||||
RrPixmapMask *disabled_mask;
|
||||
RrPixmapMask *hover_mask;
|
||||
RrPixmapMask *toggled_mask;
|
||||
RrPixmapMask *toggled_hover_mask;
|
||||
RrPixmapMask *toggled_pressed_mask;
|
||||
|
||||
/* textures */
|
||||
RrAppearance *a_focused_unpressed;
|
||||
RrAppearance *a_unfocused_unpressed;
|
||||
RrAppearance *a_focused_pressed;
|
||||
RrAppearance *a_unfocused_pressed;
|
||||
RrAppearance *a_disabled_focused;
|
||||
RrAppearance *a_disabled_unfocused;
|
||||
RrAppearance *a_hover_focused;
|
||||
RrAppearance *a_hover_unfocused;
|
||||
RrAppearance *a_toggled_focused_unpressed;
|
||||
RrAppearance *a_toggled_unfocused_unpressed;
|
||||
RrAppearance *a_toggled_focused_pressed;
|
||||
RrAppearance *a_toggled_unfocused_pressed;
|
||||
RrAppearance *a_toggled_hover_focused;
|
||||
RrAppearance *a_toggled_hover_unfocused;
|
||||
|
||||
};
|
||||
|
||||
/* these are the same on all endian machines because it seems to be dependant
|
||||
on the endianness of the gfx card, not the cpu. */
|
||||
#define RrDefaultAlphaOffset 24
|
||||
|
@ -318,6 +365,7 @@ gint RrGreenMask (const RrInstance *inst);
|
|||
gint RrBlueMask (const RrInstance *inst);
|
||||
|
||||
RrColor *RrColorNew (const RrInstance *inst, gint r, gint g, gint b);
|
||||
RrColor *RrColorCopy (RrColor *c);
|
||||
RrColor *RrColorParse (const RrInstance *inst, gchar *colorname);
|
||||
void RrColorFree (RrColor *in);
|
||||
|
||||
|
@ -335,6 +383,9 @@ void RrAppearanceAddTextures(RrAppearance *a, gint numtex);
|
|||
/*! Always call this when changing the type of a texture in an appearance */
|
||||
void RrAppearanceClearTextures(RrAppearance *a);
|
||||
|
||||
RrButton *RrButtonNew (const RrInstance *inst);
|
||||
void RrButtonFree(RrButton *b);
|
||||
|
||||
RrFont *RrFontOpen (const RrInstance *inst, const gchar *name,
|
||||
gint size, RrFontWeight weight, RrFontSlant slant);
|
||||
RrFont *RrFontOpenDefault (const RrInstance *inst);
|
||||
|
|
1886
obrender/theme.c
1886
obrender/theme.c
File diff suppressed because it is too large
Load diff
|
@ -90,6 +90,8 @@ struct _RrTheme {
|
|||
RrColor *menu_title_color;
|
||||
RrColor *menu_sep_color;
|
||||
RrColor *menu_color;
|
||||
RrColor *menu_bullet_color;
|
||||
RrColor *menu_bullet_selected_color;
|
||||
RrColor *menu_selected_color;
|
||||
RrColor *menu_disabled_color;
|
||||
RrColor *menu_disabled_selected_color;
|
||||
|
@ -120,36 +122,6 @@ struct _RrTheme {
|
|||
gint def_win_icon_h;
|
||||
|
||||
/* style settings - masks */
|
||||
RrPixmapMask *max_mask;
|
||||
RrPixmapMask *max_hover_mask;
|
||||
RrPixmapMask *max_pressed_mask;
|
||||
RrPixmapMask *max_toggled_mask;
|
||||
RrPixmapMask *max_toggled_hover_mask;
|
||||
RrPixmapMask *max_toggled_pressed_mask;
|
||||
RrPixmapMask *max_disabled_mask;
|
||||
RrPixmapMask *iconify_mask;
|
||||
RrPixmapMask *iconify_hover_mask;
|
||||
RrPixmapMask *iconify_pressed_mask;
|
||||
RrPixmapMask *iconify_disabled_mask;
|
||||
RrPixmapMask *desk_mask;
|
||||
RrPixmapMask *desk_hover_mask;
|
||||
RrPixmapMask *desk_pressed_mask;
|
||||
RrPixmapMask *desk_toggled_mask;
|
||||
RrPixmapMask *desk_toggled_hover_mask;
|
||||
RrPixmapMask *desk_toggled_pressed_mask;
|
||||
RrPixmapMask *desk_disabled_mask;
|
||||
RrPixmapMask *shade_mask;
|
||||
RrPixmapMask *shade_hover_mask;
|
||||
RrPixmapMask *shade_pressed_mask;
|
||||
RrPixmapMask *shade_toggled_mask;
|
||||
RrPixmapMask *shade_toggled_hover_mask;
|
||||
RrPixmapMask *shade_toggled_pressed_mask;
|
||||
RrPixmapMask *shade_disabled_mask;
|
||||
RrPixmapMask *close_mask;
|
||||
RrPixmapMask *close_hover_mask;
|
||||
RrPixmapMask *close_disabled_mask;
|
||||
RrPixmapMask *close_pressed_mask;
|
||||
|
||||
RrPixmapMask *menu_bullet_mask; /* submenu pointer */
|
||||
#if 0
|
||||
RrPixmapMask *menu_toggle_mask; /* menu boolean */
|
||||
|
@ -158,65 +130,14 @@ struct _RrTheme {
|
|||
RrPixmapMask *down_arrow_mask;
|
||||
RrPixmapMask *up_arrow_mask;
|
||||
|
||||
/* buttons */
|
||||
RrButton *btn_max;
|
||||
RrButton *btn_close;
|
||||
RrButton *btn_desk;
|
||||
RrButton *btn_shade;
|
||||
RrButton *btn_iconify;
|
||||
|
||||
/* global appearances */
|
||||
RrAppearance *a_disabled_focused_max;
|
||||
RrAppearance *a_disabled_unfocused_max;
|
||||
RrAppearance *a_hover_focused_max;
|
||||
RrAppearance *a_hover_unfocused_max;
|
||||
RrAppearance *a_focused_unpressed_max;
|
||||
RrAppearance *a_focused_pressed_max;
|
||||
RrAppearance *a_unfocused_unpressed_max;
|
||||
RrAppearance *a_unfocused_pressed_max;
|
||||
RrAppearance *a_toggled_hover_focused_max;
|
||||
RrAppearance *a_toggled_hover_unfocused_max;
|
||||
RrAppearance *a_toggled_focused_unpressed_max;
|
||||
RrAppearance *a_toggled_focused_pressed_max;
|
||||
RrAppearance *a_toggled_unfocused_unpressed_max;
|
||||
RrAppearance *a_toggled_unfocused_pressed_max;
|
||||
RrAppearance *a_disabled_focused_close;
|
||||
RrAppearance *a_disabled_unfocused_close;
|
||||
RrAppearance *a_hover_focused_close;
|
||||
RrAppearance *a_hover_unfocused_close;
|
||||
RrAppearance *a_focused_unpressed_close;
|
||||
RrAppearance *a_focused_pressed_close;
|
||||
RrAppearance *a_unfocused_unpressed_close;
|
||||
RrAppearance *a_unfocused_pressed_close;
|
||||
RrAppearance *a_disabled_focused_desk;
|
||||
RrAppearance *a_disabled_unfocused_desk;
|
||||
RrAppearance *a_hover_focused_desk;
|
||||
RrAppearance *a_hover_unfocused_desk;
|
||||
RrAppearance *a_focused_unpressed_desk;
|
||||
RrAppearance *a_focused_pressed_desk;
|
||||
RrAppearance *a_unfocused_unpressed_desk;
|
||||
RrAppearance *a_unfocused_pressed_desk;
|
||||
RrAppearance *a_toggled_hover_focused_desk;
|
||||
RrAppearance *a_toggled_hover_unfocused_desk;
|
||||
RrAppearance *a_toggled_focused_unpressed_desk;
|
||||
RrAppearance *a_toggled_focused_pressed_desk;
|
||||
RrAppearance *a_toggled_unfocused_unpressed_desk;
|
||||
RrAppearance *a_toggled_unfocused_pressed_desk;
|
||||
RrAppearance *a_disabled_focused_shade;
|
||||
RrAppearance *a_disabled_unfocused_shade;
|
||||
RrAppearance *a_hover_focused_shade;
|
||||
RrAppearance *a_hover_unfocused_shade;
|
||||
RrAppearance *a_focused_unpressed_shade;
|
||||
RrAppearance *a_focused_pressed_shade;
|
||||
RrAppearance *a_unfocused_unpressed_shade;
|
||||
RrAppearance *a_unfocused_pressed_shade;
|
||||
RrAppearance *a_toggled_hover_focused_shade;
|
||||
RrAppearance *a_toggled_hover_unfocused_shade;
|
||||
RrAppearance *a_toggled_focused_unpressed_shade;
|
||||
RrAppearance *a_toggled_focused_pressed_shade;
|
||||
RrAppearance *a_toggled_unfocused_unpressed_shade;
|
||||
RrAppearance *a_toggled_unfocused_pressed_shade;
|
||||
RrAppearance *a_disabled_focused_iconify;
|
||||
RrAppearance *a_disabled_unfocused_iconify;
|
||||
RrAppearance *a_hover_focused_iconify;
|
||||
RrAppearance *a_hover_unfocused_iconify;
|
||||
RrAppearance *a_focused_unpressed_iconify;
|
||||
RrAppearance *a_focused_pressed_iconify;
|
||||
RrAppearance *a_unfocused_unpressed_iconify;
|
||||
RrAppearance *a_unfocused_pressed_iconify;
|
||||
RrAppearance *a_focused_grip;
|
||||
RrAppearance *a_unfocused_grip;
|
||||
RrAppearance *a_focused_title;
|
||||
|
|
|
@ -276,7 +276,7 @@ static gboolean send_to_menu_update(ObMenuFrame *frame, gpointer data)
|
|||
if ((desk == DESKTOP_ALL && c->desktop != DESKTOP_ALL) ||
|
||||
(c->desktop == DESKTOP_ALL && desk == screen_desktop))
|
||||
{
|
||||
e->data.normal.mask = ob_rr_theme->desk_mask;
|
||||
e->data.normal.mask = ob_rr_theme->btn_desk->mask;
|
||||
set_icon_color(e);
|
||||
} else
|
||||
e->data.normal.mask = NULL;
|
||||
|
@ -392,7 +392,7 @@ void client_menu_startup(void)
|
|||
menu_add_submenu(menu, CLIENT_LAYER, LAYER_MENU_NAME);
|
||||
|
||||
e = menu_add_normal(menu, CLIENT_RESTORE, _("R_estore"), NULL, TRUE);
|
||||
e->data.normal.mask = ob_rr_theme->max_toggled_mask;
|
||||
e->data.normal.mask = ob_rr_theme->btn_max->toggled_mask;
|
||||
set_icon_color(e);
|
||||
|
||||
menu_add_normal(menu, CLIENT_MOVE, _("_Move"), NULL, TRUE);
|
||||
|
@ -400,15 +400,15 @@ void client_menu_startup(void)
|
|||
menu_add_normal(menu, CLIENT_RESIZE, _("Resi_ze"), NULL, TRUE);
|
||||
|
||||
e = menu_add_normal(menu, CLIENT_ICONIFY, _("Ico_nify"), NULL, TRUE);
|
||||
e->data.normal.mask = ob_rr_theme->iconify_mask;
|
||||
e->data.normal.mask = ob_rr_theme->btn_iconify->mask;
|
||||
set_icon_color(e);
|
||||
|
||||
e = menu_add_normal(menu, CLIENT_MAXIMIZE, _("Ma_ximize"), NULL, TRUE);
|
||||
e->data.normal.mask = ob_rr_theme->max_mask;
|
||||
e->data.normal.mask = ob_rr_theme->btn_max->mask;
|
||||
set_icon_color(e);
|
||||
|
||||
e = menu_add_normal(menu, CLIENT_SHADE, _("_Roll up/down"), NULL, TRUE);
|
||||
e->data.normal.mask = ob_rr_theme->shade_mask;
|
||||
e->data.normal.mask = ob_rr_theme->btn_shade->mask;
|
||||
set_icon_color(e);
|
||||
|
||||
menu_add_normal(menu, CLIENT_DECORATE, _("Un/_Decorate"), NULL, TRUE);
|
||||
|
@ -416,6 +416,6 @@ void client_menu_startup(void)
|
|||
menu_add_separator(menu, -1, NULL);
|
||||
|
||||
e = menu_add_normal(menu, CLIENT_CLOSE, _("_Close"), NULL, TRUE);
|
||||
e->data.normal.mask = ob_rr_theme->close_mask;
|
||||
e->data.normal.mask = ob_rr_theme->btn_close->mask;
|
||||
set_icon_color(e);
|
||||
}
|
||||
|
|
|
@ -127,116 +127,116 @@ void framerender_frame(ObFrame *self)
|
|||
t = ob_rr_theme->a_focused_title;
|
||||
l = ob_rr_theme->a_focused_label;
|
||||
m = (!(self->decorations & OB_FRAME_DECOR_MAXIMIZE) ?
|
||||
ob_rr_theme->a_disabled_focused_max :
|
||||
ob_rr_theme->btn_max->a_disabled_focused :
|
||||
(self->client->max_vert || self->client->max_horz ?
|
||||
(self->max_press ?
|
||||
ob_rr_theme->a_toggled_focused_pressed_max :
|
||||
ob_rr_theme->btn_max->a_toggled_focused_pressed :
|
||||
(self->max_hover ?
|
||||
ob_rr_theme->a_toggled_hover_focused_max :
|
||||
ob_rr_theme->a_toggled_focused_unpressed_max)) :
|
||||
ob_rr_theme->btn_max->a_toggled_hover_focused :
|
||||
ob_rr_theme->btn_max->a_toggled_focused_unpressed)) :
|
||||
(self->max_press ?
|
||||
ob_rr_theme->a_focused_pressed_max :
|
||||
ob_rr_theme->btn_max->a_focused_pressed :
|
||||
(self->max_hover ?
|
||||
ob_rr_theme->a_hover_focused_max :
|
||||
ob_rr_theme->a_focused_unpressed_max))));
|
||||
ob_rr_theme->btn_max->a_hover_focused :
|
||||
ob_rr_theme->btn_max->a_focused_unpressed))));
|
||||
n = ob_rr_theme->a_icon;
|
||||
i = (!(self->decorations & OB_FRAME_DECOR_ICONIFY) ?
|
||||
ob_rr_theme->a_disabled_focused_iconify :
|
||||
ob_rr_theme->btn_iconify->a_disabled_focused :
|
||||
(self->iconify_press ?
|
||||
ob_rr_theme->a_focused_pressed_iconify :
|
||||
ob_rr_theme->btn_iconify->a_focused_pressed :
|
||||
(self->iconify_hover ?
|
||||
ob_rr_theme->a_hover_focused_iconify :
|
||||
ob_rr_theme->a_focused_unpressed_iconify)));
|
||||
ob_rr_theme->btn_iconify->a_hover_focused :
|
||||
ob_rr_theme->btn_iconify->a_focused_unpressed)));
|
||||
d = (!(self->decorations & OB_FRAME_DECOR_ALLDESKTOPS) ?
|
||||
ob_rr_theme->a_disabled_focused_desk :
|
||||
ob_rr_theme->btn_desk->a_disabled_focused :
|
||||
(self->client->desktop == DESKTOP_ALL ?
|
||||
(self->desk_press ?
|
||||
ob_rr_theme->a_toggled_focused_pressed_desk :
|
||||
ob_rr_theme->btn_desk->a_toggled_focused_pressed :
|
||||
(self->desk_hover ?
|
||||
ob_rr_theme->a_toggled_hover_focused_desk :
|
||||
ob_rr_theme->a_toggled_focused_unpressed_desk)) :
|
||||
ob_rr_theme->btn_desk->a_toggled_hover_focused :
|
||||
ob_rr_theme->btn_desk->a_toggled_focused_unpressed)) :
|
||||
(self->desk_press ?
|
||||
ob_rr_theme->a_focused_pressed_desk :
|
||||
ob_rr_theme->btn_desk->a_focused_pressed :
|
||||
(self->desk_hover ?
|
||||
ob_rr_theme->a_hover_focused_desk :
|
||||
ob_rr_theme->a_focused_unpressed_desk))));
|
||||
ob_rr_theme->btn_desk->a_hover_focused :
|
||||
ob_rr_theme->btn_desk->a_focused_unpressed))));
|
||||
s = (!(self->decorations & OB_FRAME_DECOR_SHADE) ?
|
||||
ob_rr_theme->a_disabled_focused_shade :
|
||||
ob_rr_theme->btn_shade->a_disabled_focused :
|
||||
(self->client->shaded ?
|
||||
(self->shade_press ?
|
||||
ob_rr_theme->a_toggled_focused_pressed_shade :
|
||||
ob_rr_theme->btn_shade->a_toggled_focused_pressed :
|
||||
(self->shade_hover ?
|
||||
ob_rr_theme->a_toggled_hover_focused_shade :
|
||||
ob_rr_theme->a_toggled_focused_unpressed_shade)) :
|
||||
ob_rr_theme->btn_shade->a_toggled_hover_focused :
|
||||
ob_rr_theme->btn_shade->a_toggled_focused_unpressed)) :
|
||||
(self->shade_press ?
|
||||
ob_rr_theme->a_focused_pressed_shade :
|
||||
ob_rr_theme->btn_shade->a_focused_pressed :
|
||||
(self->shade_hover ?
|
||||
ob_rr_theme->a_hover_focused_shade :
|
||||
ob_rr_theme->a_focused_unpressed_shade))));
|
||||
ob_rr_theme->btn_shade->a_hover_focused :
|
||||
ob_rr_theme->btn_shade->a_focused_unpressed))));
|
||||
c = (!(self->decorations & OB_FRAME_DECOR_CLOSE) ?
|
||||
ob_rr_theme->a_disabled_focused_close :
|
||||
ob_rr_theme->btn_close->a_disabled_focused :
|
||||
(self->close_press ?
|
||||
ob_rr_theme->a_focused_pressed_close :
|
||||
ob_rr_theme->btn_close->a_focused_pressed :
|
||||
(self->close_hover ?
|
||||
ob_rr_theme->a_hover_focused_close :
|
||||
ob_rr_theme->a_focused_unpressed_close)));
|
||||
ob_rr_theme->btn_close->a_hover_focused :
|
||||
ob_rr_theme->btn_close->a_focused_unpressed)));
|
||||
} else {
|
||||
t = ob_rr_theme->a_unfocused_title;
|
||||
l = ob_rr_theme->a_unfocused_label;
|
||||
m = (!(self->decorations & OB_FRAME_DECOR_MAXIMIZE) ?
|
||||
ob_rr_theme->a_disabled_unfocused_max :
|
||||
ob_rr_theme->btn_max->a_disabled_unfocused :
|
||||
(self->client->max_vert || self->client->max_horz ?
|
||||
(self->max_press ?
|
||||
ob_rr_theme->a_toggled_unfocused_pressed_max :
|
||||
ob_rr_theme->btn_max->a_toggled_unfocused_pressed :
|
||||
(self->max_hover ?
|
||||
ob_rr_theme->a_toggled_hover_unfocused_max :
|
||||
ob_rr_theme->a_toggled_unfocused_unpressed_max)) :
|
||||
ob_rr_theme->btn_max->a_toggled_hover_unfocused :
|
||||
ob_rr_theme->btn_max->a_toggled_unfocused_unpressed)) :
|
||||
(self->max_press ?
|
||||
ob_rr_theme->a_unfocused_pressed_max :
|
||||
ob_rr_theme->btn_max->a_unfocused_pressed :
|
||||
(self->max_hover ?
|
||||
ob_rr_theme->a_hover_unfocused_max :
|
||||
ob_rr_theme->a_unfocused_unpressed_max))));
|
||||
ob_rr_theme->btn_max->a_hover_unfocused :
|
||||
ob_rr_theme->btn_max->a_unfocused_unpressed))));
|
||||
n = ob_rr_theme->a_icon;
|
||||
i = (!(self->decorations & OB_FRAME_DECOR_ICONIFY) ?
|
||||
ob_rr_theme->a_disabled_unfocused_iconify :
|
||||
ob_rr_theme->btn_iconify->a_disabled_unfocused :
|
||||
(self->iconify_press ?
|
||||
ob_rr_theme->a_unfocused_pressed_iconify :
|
||||
ob_rr_theme->btn_iconify->a_unfocused_pressed :
|
||||
(self->iconify_hover ?
|
||||
ob_rr_theme->a_hover_unfocused_iconify :
|
||||
ob_rr_theme->a_unfocused_unpressed_iconify)));
|
||||
ob_rr_theme->btn_iconify->a_hover_unfocused :
|
||||
ob_rr_theme->btn_iconify->a_unfocused_unpressed)));
|
||||
d = (!(self->decorations & OB_FRAME_DECOR_ALLDESKTOPS) ?
|
||||
ob_rr_theme->a_disabled_unfocused_desk :
|
||||
ob_rr_theme->btn_desk->a_disabled_unfocused :
|
||||
(self->client->desktop == DESKTOP_ALL ?
|
||||
(self->desk_press ?
|
||||
ob_rr_theme->a_toggled_unfocused_pressed_desk :
|
||||
ob_rr_theme->btn_desk->a_toggled_unfocused_pressed :
|
||||
(self->desk_hover ?
|
||||
ob_rr_theme->a_toggled_hover_unfocused_desk :
|
||||
ob_rr_theme->a_toggled_unfocused_unpressed_desk)) :
|
||||
ob_rr_theme->btn_desk->a_toggled_hover_unfocused :
|
||||
ob_rr_theme->btn_desk->a_toggled_unfocused_unpressed)) :
|
||||
(self->desk_press ?
|
||||
ob_rr_theme->a_unfocused_pressed_desk :
|
||||
ob_rr_theme->btn_desk->a_unfocused_pressed :
|
||||
(self->desk_hover ?
|
||||
ob_rr_theme->a_hover_unfocused_desk :
|
||||
ob_rr_theme->a_unfocused_unpressed_desk))));
|
||||
ob_rr_theme->btn_desk->a_hover_unfocused :
|
||||
ob_rr_theme->btn_desk->a_unfocused_unpressed))));
|
||||
s = (!(self->decorations & OB_FRAME_DECOR_SHADE) ?
|
||||
ob_rr_theme->a_disabled_unfocused_shade :
|
||||
ob_rr_theme->btn_shade->a_disabled_unfocused :
|
||||
(self->client->shaded ?
|
||||
(self->shade_press ?
|
||||
ob_rr_theme->a_toggled_unfocused_pressed_shade :
|
||||
ob_rr_theme->btn_shade->a_toggled_unfocused_pressed :
|
||||
(self->shade_hover ?
|
||||
ob_rr_theme->a_toggled_hover_unfocused_shade :
|
||||
ob_rr_theme->a_toggled_unfocused_unpressed_shade)) :
|
||||
ob_rr_theme->btn_shade->a_toggled_hover_unfocused :
|
||||
ob_rr_theme->btn_shade->a_toggled_unfocused_unpressed)) :
|
||||
(self->shade_press ?
|
||||
ob_rr_theme->a_unfocused_pressed_shade :
|
||||
ob_rr_theme->btn_shade->a_unfocused_pressed :
|
||||
(self->shade_hover ?
|
||||
ob_rr_theme->a_hover_unfocused_shade :
|
||||
ob_rr_theme->a_unfocused_unpressed_shade))));
|
||||
ob_rr_theme->btn_shade->a_hover_unfocused :
|
||||
ob_rr_theme->btn_shade->a_unfocused_unpressed))));
|
||||
c = (!(self->decorations & OB_FRAME_DECOR_CLOSE) ?
|
||||
ob_rr_theme->a_disabled_unfocused_close :
|
||||
ob_rr_theme->btn_close->a_disabled_unfocused :
|
||||
(self->close_press ?
|
||||
ob_rr_theme->a_unfocused_pressed_close :
|
||||
ob_rr_theme->btn_close->a_unfocused_pressed :
|
||||
(self->close_hover ?
|
||||
ob_rr_theme->a_hover_unfocused_close :
|
||||
ob_rr_theme->a_unfocused_unpressed_close)));
|
||||
ob_rr_theme->btn_close->a_hover_unfocused :
|
||||
ob_rr_theme->btn_close->a_unfocused_unpressed)));
|
||||
}
|
||||
clear = ob_rr_theme->a_clear;
|
||||
|
||||
|
|
|
@ -59,10 +59,10 @@ void prompt_startup(gboolean reconfig)
|
|||
/* note: this is not a copy, don't free it */
|
||||
prompt_a_bg = ob_rr_theme->osd_bg;
|
||||
|
||||
prompt_a_button = RrAppearanceCopy(ob_rr_theme->a_focused_unpressed_close);
|
||||
prompt_a_focus = RrAppearanceCopy(ob_rr_theme->a_hover_focused_close);
|
||||
prompt_a_press = RrAppearanceCopy(ob_rr_theme->a_focused_pressed_close);
|
||||
prompt_a_pfocus = RrAppearanceCopy(ob_rr_theme->a_focused_pressed_close);
|
||||
prompt_a_button = RrAppearanceCopy(ob_rr_theme->btn_close->a_focused_unpressed);
|
||||
prompt_a_focus = RrAppearanceCopy(ob_rr_theme->btn_close->a_hover_focused);
|
||||
prompt_a_press = RrAppearanceCopy(ob_rr_theme->btn_close->a_focused_pressed);
|
||||
prompt_a_pfocus = RrAppearanceCopy(ob_rr_theme->btn_close->a_focused_pressed);
|
||||
|
||||
c_button = prompt_a_button->texture[0].data.mask.color;
|
||||
c_focus = prompt_a_focus->texture[0].data.mask.color;
|
||||
|
|
Loading…
Reference in a new issue