Commit 42e231ff authored by Luis de Bethencourt's avatar Luis de Bethencourt

ui: controls clamped to a minimum pixel size

parent 4d7df356
......@@ -1141,6 +1141,9 @@ update_controls_size (UserInterface * ui)
if (ctl_width > CONTROLS_MAX_WIDTH) {
ctl_width = CONTROLS_MAX_WIDTH;
ctl_height = ctl_width / CONTROLS_ASPECT_RATIO;
} else if (ctl_width < CONTROLS_MIN_WIDTH) {
ctl_width = CONTROLS_MIN_WIDTH;
ctl_height = ctl_width / CONTROLS_ASPECT_RATIO;
}
icon_size = ctl_height * PLAY_TOGGLE_RATIO;
......
......@@ -35,6 +35,7 @@
#define CONTROLS_HEIGHT_RATIO 0.20f
#define CONTROLS_ASPECT_RATIO 4.0f
#define CONTROLS_MAX_WIDTH 480.0f
#define CONTROLS_MIN_WIDTH 300.0f
#define MAIN_BOX_W 0.95f
#define MAIN_BOX_H 0.8f
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment