Merge branch 'kbd-indicator-tweaks' into 'master'
keyboard indicator theming improvements See merge request plymouth/plymouth!79
3
.gitignore
vendored
|
|
@ -14,7 +14,6 @@ configure
|
|||
config.h*
|
||||
*-test
|
||||
*.la
|
||||
.gitignore
|
||||
config.log
|
||||
build-tools
|
||||
config.status
|
||||
|
|
@ -43,3 +42,5 @@ tags
|
|||
*.path
|
||||
docs/*.8
|
||||
docs/*.1
|
||||
ABOUT-NLS
|
||||
m4
|
||||
|
|
|
|||
8
po/.gitignore
vendored
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
Makefile.in.in
|
||||
Makevars.template
|
||||
POTFILES
|
||||
Rules-quot
|
||||
*.gmo
|
||||
*.header
|
||||
*.sin
|
||||
*.sed
|
||||
|
|
@ -67,7 +67,7 @@ ct.paint()
|
|||
ct.restore()
|
||||
ct.select_font_face("Cantarell", cairo.FONT_SLANT_NORMAL, cairo.FONT_WEIGHT_BOLD)
|
||||
ct.set_font_size(FONT_SIZE)
|
||||
ct.set_source_rgba(0.9, 0.9, 0.9, 1.0)
|
||||
ct.set_source_rgba(0.75, 0.75, 0.75, 1.0)
|
||||
|
||||
ct.move_to(MARGIN, MARGIN + max_height - descent)
|
||||
current_x, current_y = (MARGIN, MARGIN + max_height - descent)
|
||||
|
|
|
|||
|
|
@ -146,9 +146,6 @@ struct _ply_boot_splash_plugin
|
|||
double dialog_horizontal_alignment;
|
||||
double dialog_vertical_alignment;
|
||||
|
||||
double keyboard_indicator_horizontal_alignment;
|
||||
double keyboard_indicator_vertical_alignment;
|
||||
|
||||
double title_horizontal_alignment;
|
||||
double title_vertical_alignment;
|
||||
char *title_font;
|
||||
|
|
@ -879,6 +876,8 @@ view_show_prompt (view_t *view,
|
|||
ply_boot_splash_plugin_t *plugin;
|
||||
unsigned long screen_width, screen_height, entry_width, entry_height;
|
||||
unsigned long keyboard_indicator_width, keyboard_indicator_height;
|
||||
bool show_keyboard_indicators = false;
|
||||
long dialog_bottom;
|
||||
int x, y;
|
||||
|
||||
assert (view != NULL);
|
||||
|
|
@ -922,21 +921,7 @@ view_show_prompt (view_t *view,
|
|||
|
||||
ply_entry_show (view->entry, plugin->loop, view->display, x, y);
|
||||
|
||||
keyboard_indicator_width =
|
||||
ply_keymap_icon_get_width (view->keymap_icon);
|
||||
keyboard_indicator_height = MAX(
|
||||
ply_capslock_icon_get_height (view->capslock_icon),
|
||||
ply_keymap_icon_get_height (view->keymap_icon));
|
||||
|
||||
x = (screen_width - keyboard_indicator_width) * plugin->keyboard_indicator_horizontal_alignment;
|
||||
y = (screen_height - keyboard_indicator_height) * plugin->keyboard_indicator_vertical_alignment +
|
||||
(keyboard_indicator_height - ply_keymap_icon_get_height (view->keymap_icon)) / 2.0;
|
||||
ply_keymap_icon_show (view->keymap_icon, x, y);
|
||||
|
||||
x += ply_keymap_icon_get_width (view->keymap_icon);
|
||||
y = (screen_height - keyboard_indicator_height) * plugin->keyboard_indicator_vertical_alignment +
|
||||
(keyboard_indicator_height - ply_capslock_icon_get_height (view->capslock_icon)) / 2.0;
|
||||
ply_capslock_icon_show (view->capslock_icon, plugin->loop, view->display, x, y);
|
||||
show_keyboard_indicators = true;
|
||||
}
|
||||
|
||||
if (entry_text != NULL)
|
||||
|
|
@ -945,6 +930,8 @@ view_show_prompt (view_t *view,
|
|||
if (number_of_bullets != -1)
|
||||
ply_entry_set_bullet_count (view->entry, number_of_bullets);
|
||||
|
||||
dialog_bottom = view->dialog_area.y + view->dialog_area.height;
|
||||
|
||||
if (prompt != NULL) {
|
||||
ply_label_set_text (view->label, prompt);
|
||||
|
||||
|
|
@ -954,9 +941,29 @@ view_show_prompt (view_t *view,
|
|||
ply_label_set_width (view->label, label_width);
|
||||
|
||||
x = (screen_width - label_width) / 2;
|
||||
y = view->dialog_area.y + view->dialog_area.height;
|
||||
y = dialog_bottom;
|
||||
|
||||
ply_label_show (view->label, view->display, x, y);
|
||||
|
||||
dialog_bottom += ply_label_get_height (view->label);
|
||||
}
|
||||
|
||||
if (show_keyboard_indicators) {
|
||||
keyboard_indicator_width =
|
||||
ply_keymap_icon_get_width (view->keymap_icon);
|
||||
keyboard_indicator_height = MAX(
|
||||
ply_capslock_icon_get_height (view->capslock_icon),
|
||||
ply_keymap_icon_get_height (view->keymap_icon));
|
||||
|
||||
x = (screen_width - keyboard_indicator_width) * plugin->dialog_horizontal_alignment;
|
||||
y = dialog_bottom + keyboard_indicator_height / 2 +
|
||||
(keyboard_indicator_height - ply_keymap_icon_get_height (view->keymap_icon)) / 2.0;
|
||||
ply_keymap_icon_show (view->keymap_icon, x, y);
|
||||
|
||||
x += ply_keymap_icon_get_width (view->keymap_icon);
|
||||
y = dialog_bottom + keyboard_indicator_height / 2 +
|
||||
(keyboard_indicator_height - ply_capslock_icon_get_height (view->capslock_icon)) / 2.0;
|
||||
ply_capslock_icon_show (view->capslock_icon, plugin->loop, view->display, x, y);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1083,18 +1090,6 @@ create_plugin (ply_key_file_t *key_file)
|
|||
ply_key_file_get_double (key_file, "two-step",
|
||||
"DialogVerticalAlignment", 0.5);
|
||||
|
||||
/* Keyboard layout + capslock indicator alignment, this defaults
|
||||
* to halfway between the dialog and the bottom of the screen.
|
||||
*/
|
||||
plugin->keyboard_indicator_horizontal_alignment =
|
||||
ply_key_file_get_double (key_file, "two-step",
|
||||
"KeyboardIndicatorHorizontalAlignment",
|
||||
plugin->dialog_horizontal_alignment);
|
||||
plugin->keyboard_indicator_vertical_alignment =
|
||||
ply_key_file_get_double (key_file, "two-step",
|
||||
"KeyboardIndicatorVerticalAlignment",
|
||||
0.5 + 0.5 * plugin->dialog_vertical_alignment);
|
||||
|
||||
/* Title alignment */
|
||||
plugin->title_horizontal_alignment =
|
||||
ply_key_file_get_double (key_file, "two-step",
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 1,016 B After Width: | Height: | Size: 616 B |
|
|
@ -7,7 +7,7 @@ A4
|
|||
Single
|
||||
-2
|
||||
1200 2
|
||||
0 32 #e8e8e8
|
||||
0 32 #c0c0c0
|
||||
2 3 0 1 32 32 50 -1 20 0.000 0 0 0 0 0 4
|
||||
1440 225 193 1620 2687 1620 1440 225
|
||||
2 2 0 1 32 32 50 -1 20 0.000 0 0 -1 0 0 5
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 958 B After Width: | Height: | Size: 960 B |
BIN
themes/spinner/entry-nolock.png
Normal file
|
After Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 407 B After Width: | Height: | Size: 8.8 KiB |
|
Before Width: | Height: | Size: 5.6 KiB After Width: | Height: | Size: 946 B |
|
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 26 KiB |
|
Before Width: | Height: | Size: 619 B After Width: | Height: | Size: 2 KiB |