mirror of
https://github.com/davatorium/rofi.git
synced 2024-11-18 13:54:36 -05:00
Add the prompt colon to the default theme.
- Fix dumping of theme localization of the decimal-point. Force it to be always a '.'.
This commit is contained in:
parent
bfd8e25436
commit
f992e0e21a
4 changed files with 26 additions and 5 deletions
|
@ -116,9 +116,10 @@ button selected {
|
||||||
text-color: @selected-normal-foreground;
|
text-color: @selected-normal-foreground;
|
||||||
}
|
}
|
||||||
inputbar {
|
inputbar {
|
||||||
spacing: 3px ;
|
spacing: 0px ;
|
||||||
text-color: @normal-foreground;
|
text-color: @normal-foreground;
|
||||||
padding: 1px ;
|
padding: 1px ;
|
||||||
|
children: [ prompt,textbox-prompt-colon,entry,case-indicator ];
|
||||||
}
|
}
|
||||||
case-indicator {
|
case-indicator {
|
||||||
spacing: 0;
|
spacing: 0;
|
||||||
|
@ -132,3 +133,9 @@ prompt {
|
||||||
spacing: 0;
|
spacing: 0;
|
||||||
text-color: @normal-foreground;
|
text-color: @normal-foreground;
|
||||||
}
|
}
|
||||||
|
textbox-prompt-colon {
|
||||||
|
expand: false;
|
||||||
|
str: ":";
|
||||||
|
margin: 0px 0.3000em 0.0000em 0.0000em ;
|
||||||
|
text-color: inherit;
|
||||||
|
}
|
||||||
|
|
|
@ -116,9 +116,10 @@ button selected {
|
||||||
text-color: @selected-normal-foreground;
|
text-color: @selected-normal-foreground;
|
||||||
}
|
}
|
||||||
inputbar {
|
inputbar {
|
||||||
spacing: 3px ;
|
spacing: 0px ;
|
||||||
text-color: @normal-foreground;
|
text-color: @normal-foreground;
|
||||||
padding: 1px ;
|
padding: 1px ;
|
||||||
|
children: [ prompt,textbox-prompt-colon,entry,case-indicator ];
|
||||||
}
|
}
|
||||||
case-indicator {
|
case-indicator {
|
||||||
spacing: 0;
|
spacing: 0;
|
||||||
|
@ -132,3 +133,9 @@ prompt {
|
||||||
spacing: 0;
|
spacing: 0;
|
||||||
text-color: @normal-foreground;
|
text-color: @normal-foreground;
|
||||||
}
|
}
|
||||||
|
textbox-prompt-colon {
|
||||||
|
expand: false;
|
||||||
|
str: ":";
|
||||||
|
margin: 0px 0.3000em 0.0000em 0.0000em ;
|
||||||
|
text-color: inherit;
|
||||||
|
}
|
||||||
|
|
|
@ -167,7 +167,6 @@ STRING \"{UANYN}*\"
|
||||||
HEX [[:xdigit:]]
|
HEX [[:xdigit:]]
|
||||||
NUMBER [[:digit:]]
|
NUMBER [[:digit:]]
|
||||||
PNNUMBER [-+]?[[:digit:]]+
|
PNNUMBER [-+]?[[:digit:]]+
|
||||||
REAL [-+]?[[:digit:]]+(\.[[:digit:]]+)?
|
|
||||||
PX (px)
|
PX (px)
|
||||||
EM (em)
|
EM (em)
|
||||||
CH (ch)
|
CH (ch)
|
||||||
|
|
|
@ -139,16 +139,24 @@ void rofi_theme_free ( ThemeWidget *widget )
|
||||||
/**
|
/**
|
||||||
* print
|
* print
|
||||||
*/
|
*/
|
||||||
|
inline static void printf_double ( double d )
|
||||||
|
{
|
||||||
|
char buf[G_ASCII_DTOSTR_BUF_SIZE];
|
||||||
|
g_ascii_formatd ( buf, G_ASCII_DTOSTR_BUF_SIZE,"%.4lf", d );
|
||||||
|
fputs ( buf, stdout );
|
||||||
|
}
|
||||||
static void rofi_theme_print_distance ( RofiDistance d )
|
static void rofi_theme_print_distance ( RofiDistance d )
|
||||||
{
|
{
|
||||||
if ( d.type == ROFI_PU_PX ) {
|
if ( d.type == ROFI_PU_PX ) {
|
||||||
printf ( "%upx ", (unsigned int) d.distance );
|
printf ( "%upx ", (unsigned int) d.distance );
|
||||||
}
|
}
|
||||||
else if ( d.type == ROFI_PU_PERCENT ) {
|
else if ( d.type == ROFI_PU_PERCENT ) {
|
||||||
printf ( "%f%% ", d.distance );
|
printf_double ( d.distance );
|
||||||
|
fputs ( "%% ", stdout );
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
printf ( "%fem ", d.distance );
|
printf_double ( d.distance );
|
||||||
|
fputs ( "em ", stdout );
|
||||||
}
|
}
|
||||||
if ( d.style == ROFI_HL_DASH ) {
|
if ( d.style == ROFI_HL_DASH ) {
|
||||||
printf ( "dash " );
|
printf ( "dash " );
|
||||||
|
|
Loading…
Reference in a new issue