summaryrefslogtreecommitdiffstats
path: root/source
diff options
context:
space:
mode:
authorDave Davenport <qball@gmpclient.org>2017-06-02 16:09:20 +0200
committerDave Davenport <qball@gmpclient.org>2017-06-02 16:09:20 +0200
commit48bf1709b6bcc316ad8019afc11d2cf8452817a0 (patch)
treec3b22e7a006df026f7bfab6411baf08e9898f766 /source
parenteec5c6eadcc5de3c5285a5240db6da2e439d287a (diff)
Rename HL_ to ROFI_HL_ and fix box test.
Diffstat (limited to 'source')
-rw-r--r--source/helper.c12
-rw-r--r--source/theme.c10
-rw-r--r--source/view.c2
-rw-r--r--source/widgets/widget.c4
4 files changed, 14 insertions, 14 deletions
diff --git a/source/helper.c b/source/helper.c
index e0a0563e..a299e612 100644
--- a/source/helper.c
+++ b/source/helper.c
@@ -411,37 +411,37 @@ PangoAttrList *helper_token_match_get_pango_attr ( ThemeHighlight th, GRegex **t
for ( int index = ( count > 1 ) ? 1 : 0; index < count; index++ ) {
int start, end;
g_match_info_fetch_pos ( gmi, index, &start, &end );
- if ( th.style & HL_BOLD ) {
+ if ( th.style & ROFI_HL_BOLD ) {
PangoAttribute *pa = pango_attr_weight_new ( PANGO_WEIGHT_BOLD );
pa->start_index = start;
pa->end_index = end;
pango_attr_list_insert ( retv, pa );
}
- if ( th.style & HL_UNDERLINE ) {
+ if ( th.style & ROFI_HL_UNDERLINE ) {
PangoAttribute *pa = pango_attr_underline_new ( PANGO_UNDERLINE_SINGLE );
pa->start_index = start;
pa->end_index = end;
pango_attr_list_insert ( retv, pa );
}
- if ( th.style & HL_STRIKETHROUGH ) {
+ if ( th.style & ROFI_HL_STRIKETHROUGH ) {
PangoAttribute *pa = pango_attr_strikethrough_new ( TRUE );
pa->start_index = start;
pa->end_index = end;
pango_attr_list_insert ( retv, pa );
}
- if ( th.style & HL_SMALL_CAPS ) {
+ if ( th.style & ROFI_HL_SMALL_CAPS ) {
PangoAttribute *pa = pango_attr_variant_new ( PANGO_VARIANT_SMALL_CAPS );
pa->start_index = start;
pa->end_index = end;
pango_attr_list_insert ( retv, pa );
}
- if ( th.style & HL_ITALIC ) {
+ if ( th.style & ROFI_HL_ITALIC ) {
PangoAttribute *pa = pango_attr_style_new ( PANGO_STYLE_ITALIC );
pa->start_index = start;
pa->end_index = end;
pango_attr_list_insert ( retv, pa );
}
- if ( th.style & HL_COLOR ) {
+ if ( th.style & ROFI_HL_COLOR ) {
PangoAttribute *pa = pango_attr_foreground_new (
th.color.red * 65535,
th.color.green * 65535,
diff --git a/source/theme.c b/source/theme.c
index fc72307a..edfc4be5 100644
--- a/source/theme.c
+++ b/source/theme.c
@@ -164,19 +164,19 @@ static void rofi_theme_print_property_index ( size_t pnl, int depth, Property *p
switch ( p->type )
{
case P_HIGHLIGHT:
- if ( p->value.highlight.style & HL_BOLD ) {
+ if ( p->value.highlight.style & ROFI_HL_BOLD ) {
printf ( "bold " );
}
- if ( p->value.highlight.style & HL_UNDERLINE ) {
+ if ( p->value.highlight.style & ROFI_HL_UNDERLINE ) {
printf ( "underline " );
}
- if ( p->value.highlight.style & HL_STRIKETHROUGH ) {
+ if ( p->value.highlight.style & ROFI_HL_STRIKETHROUGH ) {
printf ( "strikethrough " );
}
- if ( p->value.highlight.style & HL_ITALIC ) {
+ if ( p->value.highlight.style & ROFI_HL_ITALIC ) {
printf ( "italic " );
}
- if ( p->value.highlight.style & HL_COLOR ) {
+ if ( p->value.highlight.style & ROFI_HL_COLOR ) {
printf ( "rgba ( %.0f, %.0f, %.0f, %.0f %% )",
( p->value.highlight.color.red * 255.0 ),
( p->value.highlight.color.green * 255.0 ),
diff --git a/source/view.c b/source/view.c
index 4d636191..9b7595da 100644
--- a/source/view.c
+++ b/source/view.c
@@ -911,7 +911,7 @@ static void update_callback ( textbox *t, unsigned int index, void *udata, TextB
textbox_icon ( t, icon );
if ( state->tokens && config.show_match ) {
- ThemeHighlight th = { HL_BOLD | HL_UNDERLINE, { 0.0, 0.0, 0.0, 0.0 } };
+ ThemeHighlight th = { ROFI_HL_BOLD | ROFI_HL_UNDERLINE, { 0.0, 0.0, 0.0, 0.0 } };
th = rofi_theme_get_highlight ( WIDGET ( t ), "highlight", th );
helper_token_match_get_pango_attr ( th, state->tokens, textbox_get_visible_text ( t ), list );
}
diff --git a/source/widgets/widget.c b/source/widgets/widget.c
index 1af1af54..e0e89374 100644
--- a/source/widgets/widget.c
+++ b/source/widgets/widget.c
@@ -554,12 +554,12 @@ int widget_get_desired_height ( widget *wid )
if ( wid && wid->get_desired_height ) {
return wid->get_desired_height ( wid );
}
- return 0;
+ return wid->h;
}
int widget_get_desired_width ( widget *wid )
{
if ( wid && wid->get_desired_width ) {
return wid->get_desired_width ( wid );
}
- return 0;
+ return wid->w;
}