mirror of
https://github.com/davatorium/rofi.git
synced 2024-11-18 13:54:36 -05:00
[Theme] Do a pango version check.
This commit is contained in:
parent
77af850200
commit
9d001aaaf7
4 changed files with 19 additions and 2 deletions
|
@ -24,7 +24,7 @@ You can also use [Meson](https://mesonbuild.com/) as an alternative.
|
|||
|
||||
### External libraries
|
||||
|
||||
* libpango
|
||||
* libpango >= 1.50
|
||||
* libpangocairo
|
||||
* libcairo
|
||||
* libcairo-xcb
|
||||
|
|
|
@ -776,12 +776,20 @@ should be applied.
|
|||
\fB\fCunderline\fR: put a line under the text.
|
||||
.IP \(bu 2
|
||||
\fB\fCstrikethrough\fR: put a line through the text.
|
||||
|
||||
.RE
|
||||
|
||||
.PP
|
||||
The following options are available on pango 1.50.0 and up:
|
||||
|
||||
.RS
|
||||
.IP \(bu 2
|
||||
\fB\fCuppercase\fR: Uppercase the text.
|
||||
.IP \(bu 2
|
||||
\fB\fClowercase\fR: Lowercase the text.
|
||||
.IP \(bu 2
|
||||
\fB\fCcapitalize\fR: Capitalize the text.
|
||||
This is currently disabled because of a Pango bug.
|
||||
|
||||
.RE
|
||||
|
||||
|
|
|
@ -500,9 +500,13 @@ should be applied.
|
|||
* `italic`: put the highlighted text in script type (slanted).
|
||||
* `underline`: put a line under the text.
|
||||
* `strikethrough`: put a line through the text.
|
||||
|
||||
The following options are available on pango 1.50.0 and up:
|
||||
|
||||
* `uppercase`: Uppercase the text.
|
||||
* `lowercase`: Lowercase the text.
|
||||
* `capitalize`: Capitalize the text.
|
||||
This is currently disabled because of a Pango bug.
|
||||
|
||||
## Line style
|
||||
|
||||
|
|
|
@ -424,6 +424,7 @@ void helper_token_match_set_pango_attr_on_style(PangoAttrList *retv, int start,
|
|||
pa->end_index = end;
|
||||
pango_attr_list_insert(retv, pa);
|
||||
}
|
||||
#if PANGO_VERSION_CHECK(1, 50, 0)
|
||||
if (th.style & ROFI_HL_UPPERCASE) {
|
||||
PangoAttribute *pa =
|
||||
pango_attr_text_transform_new(PANGO_TEXT_TRANSFORM_UPPERCASE);
|
||||
|
@ -439,12 +440,16 @@ void helper_token_match_set_pango_attr_on_style(PangoAttrList *retv, int start,
|
|||
pango_attr_list_insert(retv, pa);
|
||||
}
|
||||
if (th.style & ROFI_HL_CAPITALIZE) {
|
||||
#if 0
|
||||
PangoAttribute *pa =
|
||||
pango_attr_text_transform_new(PANGO_TEXT_TRANSFORM_CAPITALIZE);
|
||||
pa->start_index = start;
|
||||
pa->end_index = end;
|
||||
pango_attr_list_insert(retv, pa);
|
||||
#endif
|
||||
// Disabled because of bug in pango
|
||||
}
|
||||
#endif
|
||||
if (th.style & ROFI_HL_UNDERLINE) {
|
||||
PangoAttribute *pa = pango_attr_underline_new(PANGO_UNDERLINE_SINGLE);
|
||||
pa->start_index = start;
|
||||
|
|
Loading…
Reference in a new issue