[Scummvm-git-logs] scummvm master -> 1b0e110df347869bf300387aca1158a15e2a9490
sev-
noreply at scummvm.org
Sat Jul 29 06:10:17 UTC 2023
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
1b0e110df3 GUI: Eliminate "WideSlider"
Commit: 1b0e110df347869bf300387aca1158a15e2a9490
https://github.com/scummvm/scummvm/commit/1b0e110df347869bf300387aca1158a15e2a9490
Author: Torbjörn Andersson (eriktorbjorn at users.sourceforge.net)
Date: 2023-07-29T08:10:13+02:00
Commit Message:
GUI: Eliminate "WideSlider"
We currently have two widget types for sliders: "Slider" and
"WideSlider". This eliminates the latter, making all sliders use the
available space. This arguably makes them look better, and should make
them easier to manipulate on touch devices like phones.
Did I say "all"? Not quite. In the high resolution layout, the volume
sliders share space with the "Mute all" checkbox. The layout engine does
not cope well with two side-by-side layouts of indeterminate width,
apparently, so there we set a width, cross our fingers and hope that the
checkbox will still have enough space in all translations.
Changed paths:
engines/scumm/dialogs.cpp
gui/themes/common/highres_layout.stx
gui/themes/common/lowres_layout.stx
gui/themes/default.inc
gui/themes/residualvm.zip
gui/themes/scummclassic.zip
gui/themes/scummclassic/classic_layout.stx
gui/themes/scummclassic/classic_layout_lowres.stx
gui/themes/scummmodern.zip
gui/themes/scummremastered.zip
diff --git a/engines/scumm/dialogs.cpp b/engines/scumm/dialogs.cpp
index faf4b14dedb..1254339cd9c 100644
--- a/engines/scumm/dialogs.cpp
+++ b/engines/scumm/dialogs.cpp
@@ -1133,7 +1133,7 @@ void LoomEgaGameOptionsWidget::defineLayout(GUI::ThemeEval &layouts, const Commo
.addLayout(GUI::ThemeLayout::kLayoutHorizontal, 12)
.addPadding(0, 0, 10, 0)
.addWidget("OvertureTicksLabel", "OptionsLabel")
- .addWidget("OvertureTicks", "WideSlider")
+ .addWidget("OvertureTicks", "Slider")
.addWidget("OvertureTicksValue", "ShortOptionsLabel")
.closeLayout()
.closeLayout()
@@ -1216,7 +1216,7 @@ void LoomVgaGameOptionsWidget::defineLayout(GUI::ThemeEval &layouts, const Commo
.addLayout(GUI::ThemeLayout::kLayoutHorizontal, 12)
.addPadding(0, 0, 10, 0)
.addWidget("PlaybackAdjustmentLabel", "OptionsLabel")
- .addWidget("PlaybackAdjustment", "WideSlider")
+ .addWidget("PlaybackAdjustment", "Slider")
.addWidget("PlaybackAdjustmentValue", "ShortOptionsLabel")
.closeLayout()
.closeLayout()
@@ -1314,13 +1314,13 @@ void MI1CdGameOptionsWidget::defineLayout(GUI::ThemeEval &layouts, const Common:
.addLayout(GUI::ThemeLayout::kLayoutHorizontal, 12)
.addPadding(0, 0, 12, 0)
.addWidget("IntroAdjustmentLabel", "OptionsLabel")
- .addWidget("IntroAdjustment", "WideSlider")
+ .addWidget("IntroAdjustment", "Slider")
.addWidget("IntroAdjustmentValue", "ShortOptionsLabel")
.closeLayout()
.addLayout(GUI::ThemeLayout::kLayoutHorizontal, 12)
.addPadding(0, 0, 0, 0)
.addWidget("OutlookAdjustmentLabel", "OptionsLabel")
- .addWidget("OutlookAdjustment", "WideSlider")
+ .addWidget("OutlookAdjustment", "Slider")
.addWidget("OutlookAdjustmentValue", "ShortOptionsLabel")
.closeLayout()
.closeLayout()
diff --git a/gui/themes/common/highres_layout.stx b/gui/themes/common/highres_layout.stx
index 38cc5ad0dfe..da2dc0dc272 100644
--- a/gui/themes/common/highres_layout.stx
+++ b/gui/themes/common/highres_layout.stx
@@ -64,6 +64,7 @@
<def var = 'Predictive.ShowDeletePic' value = '1'/>
<def var = 'DropdownButton.Width' value = '13' scalable = 'yes'/>
+ <def var = 'VolumeSlider.Width' value = '275' scalable = 'yes'/>
<def var = 'Checkbox.Spacing' value = '15' scalable = 'yes'/>
<def var = 'Radiobutton.Spacing' value = '15' scalable = 'yes'/>
@@ -104,9 +105,6 @@
/>
<widget name = 'Slider'
- size = '128, 18'
- />
- <widget name = 'WideSlider'
size = '-1, 18'
/>
<widget name = 'PopUp'
@@ -731,6 +729,7 @@
/>
<widget name = 'vcMusicSlider'
type = 'Slider'
+ width = 'Globals.VolumeSlider.Width'
rtl = 'no'
/>
<widget name = 'vcMusicLabel'
@@ -743,6 +742,7 @@
/>
<widget name = 'vcSfxSlider'
type = 'Slider'
+ width = 'Globals.VolumeSlider.Width'
rtl = 'no'
/>
<widget name = 'vcSfxLabel'
@@ -755,6 +755,7 @@
/>
<widget name = 'vcSpeechSlider'
type = 'Slider'
+ width = 'Globals.VolumeSlider.Width'
rtl = 'no'
/>
<widget name = 'vcSpeechLabel'
@@ -1724,6 +1725,7 @@
/>
<widget name = 'vcMusicSlider'
type = 'Slider'
+ width = 'Globals.VolumeSlider.Width'
rtl = 'no'
/>
<widget name = 'vcMusicLabel'
@@ -1736,6 +1738,7 @@
/>
<widget name = 'vcSfxSlider'
type = 'Slider'
+ width = 'Globals.VolumeSlider.Width'
rtl = 'no'
/>
<widget name = 'vcSfxLabel'
@@ -1748,6 +1751,7 @@
/>
<widget name = 'vcSpeechSlider'
type = 'Slider'
+ width = 'Globals.VolumeSlider.Width'
rtl = 'no'
/>
<widget name = 'vcSpeechLabel'
diff --git a/gui/themes/common/lowres_layout.stx b/gui/themes/common/lowres_layout.stx
index 73a703b4362..e0b7030ef09 100644
--- a/gui/themes/common/lowres_layout.stx
+++ b/gui/themes/common/lowres_layout.stx
@@ -93,9 +93,6 @@
/>
<widget name = 'Slider'
- size = '85, 12'
- />
- <widget name = 'WideSlider'
size = '-1, 12'
/>
<widget name = 'PopUp'
diff --git a/gui/themes/default.inc b/gui/themes/default.inc
index 7f71e95514e..115b888d201 100644
--- a/gui/themes/default.inc
+++ b/gui/themes/default.inc
@@ -1464,6 +1464,7 @@ const char *defaultXML1 = "<?xml version = '1.0'?>"
"<def var='Predictive.Button.Width' value='60' scalable='yes'/>"
"<def var='Predictive.ShowDeletePic' value='0'/>"
"<def var='DropdownButton.Width' value='17' scalable='yes'/>"
+"<def var='VolumeSlider.Width' value='275' scalable='yes'/>"
"<def var='Checkbox.Spacing' value='15' scalable='yes'/>"
"<def var='Radiobutton.Spacing' value='15' scalable='yes'/>"
"<def var='GridSupported' value='0'/>"
@@ -1490,9 +1491,6 @@ const char *defaultXML1 = "<?xml version = '1.0'?>"
"size='216,24' "
"/>"
"<widget name='Slider' "
-"size='128,18' "
-"/>"
-"<widget name='WideSlider' "
"size='-1,18' "
"/>"
"<widget name='PopUp' "
@@ -1892,6 +1890,7 @@ const char *defaultXML1 = "<?xml version = '1.0'?>"
"/>"
"<widget name='vcMusicSlider' "
"type='Slider' "
+"width='Globals.VolumeSlider.Width' "
"rtl='no' "
"/>"
"<widget name='vcMusicLabel' "
@@ -1904,6 +1903,7 @@ const char *defaultXML1 = "<?xml version = '1.0'?>"
"/>"
"<widget name='vcSfxSlider' "
"type='Slider' "
+"width='Globals.VolumeSlider.Width' "
"rtl='no' "
"/>"
"<widget name='vcSfxLabel' "
@@ -1916,6 +1916,7 @@ const char *defaultXML1 = "<?xml version = '1.0'?>"
"/>"
"<widget name='vcSpeechSlider' "
"type='Slider' "
+"width='Globals.VolumeSlider.Width' "
"rtl='no' "
"/>"
"<widget name='vcSpeechLabel' "
@@ -2811,6 +2812,7 @@ const char *defaultXML1 = "<?xml version = '1.0'?>"
"/>"
"<widget name='vcMusicSlider' "
"type='Slider' "
+"width='Globals.VolumeSlider.Width' "
"rtl='no' "
"/>"
"<widget name='vcMusicLabel' "
@@ -2823,6 +2825,7 @@ const char *defaultXML1 = "<?xml version = '1.0'?>"
"/>"
"<widget name='vcSfxSlider' "
"type='Slider' "
+"width='Globals.VolumeSlider.Width' "
"rtl='no' "
"/>"
"<widget name='vcSfxLabel' "
@@ -2835,6 +2838,7 @@ const char *defaultXML1 = "<?xml version = '1.0'?>"
"/>"
"<widget name='vcSpeechSlider' "
"type='Slider' "
+"width='Globals.VolumeSlider.Width' "
"rtl='no' "
"/>"
"<widget name='vcSpeechLabel' "
@@ -3561,9 +3565,6 @@ const char *defaultXML1 = "<?xml version = '1.0'?>"
"size='144,16' "
"/>"
"<widget name='Slider' "
-"size='85,12' "
-"/>"
-"<widget name='WideSlider' "
"size='-1,12' "
"/>"
"<widget name='PopUp' "
diff --git a/gui/themes/residualvm.zip b/gui/themes/residualvm.zip
index 4337701aae4..02aa00024e3 100644
Binary files a/gui/themes/residualvm.zip and b/gui/themes/residualvm.zip differ
diff --git a/gui/themes/scummclassic.zip b/gui/themes/scummclassic.zip
index 80bd50bb92d..e9d2bd8b43b 100644
Binary files a/gui/themes/scummclassic.zip and b/gui/themes/scummclassic.zip differ
diff --git a/gui/themes/scummclassic/classic_layout.stx b/gui/themes/scummclassic/classic_layout.stx
index b4d147e3b35..32b87f495a9 100644
--- a/gui/themes/scummclassic/classic_layout.stx
+++ b/gui/themes/scummclassic/classic_layout.stx
@@ -54,6 +54,7 @@
<def var = 'Predictive.ShowDeletePic' value = '0'/>
<def var = 'DropdownButton.Width' value = '17' scalable = 'yes'/>
+ <def var = 'VolumeSlider.Width' value = '275' scalable = 'yes'/>
<def var = 'Checkbox.Spacing' value = '15' scalable = 'yes'/>
<def var = 'Radiobutton.Spacing' value = '15' scalable = 'yes'/>
@@ -84,9 +85,6 @@
/>
<widget name = 'Slider'
- size = '128, 18'
- />
- <widget name = 'WideSlider'
size = '-1, 18'
/>
<widget name = 'PopUp'
@@ -497,6 +495,7 @@
/>
<widget name = 'vcMusicSlider'
type = 'Slider'
+ width = 'Globals.VolumeSlider.Width'
rtl = 'no'
/>
<widget name = 'vcMusicLabel'
@@ -509,6 +508,7 @@
/>
<widget name = 'vcSfxSlider'
type = 'Slider'
+ width = 'Globals.VolumeSlider.Width'
rtl = 'no'
/>
<widget name = 'vcSfxLabel'
@@ -521,6 +521,7 @@
/>
<widget name = 'vcSpeechSlider'
type = 'Slider'
+ width = 'Globals.VolumeSlider.Width'
rtl = 'no'
/>
<widget name = 'vcSpeechLabel'
@@ -1471,6 +1472,7 @@
/>
<widget name = 'vcMusicSlider'
type = 'Slider'
+ width = 'Globals.VolumeSlider.Width'
rtl = 'no'
/>
<widget name = 'vcMusicLabel'
@@ -1483,6 +1485,7 @@
/>
<widget name = 'vcSfxSlider'
type = 'Slider'
+ width = 'Globals.VolumeSlider.Width'
rtl = 'no'
/>
<widget name = 'vcSfxLabel'
@@ -1495,6 +1498,7 @@
/>
<widget name = 'vcSpeechSlider'
type = 'Slider'
+ width = 'Globals.VolumeSlider.Width'
rtl = 'no'
/>
<widget name = 'vcSpeechLabel'
diff --git a/gui/themes/scummclassic/classic_layout_lowres.stx b/gui/themes/scummclassic/classic_layout_lowres.stx
index 98587173b5c..284075fffed 100644
--- a/gui/themes/scummclassic/classic_layout_lowres.stx
+++ b/gui/themes/scummclassic/classic_layout_lowres.stx
@@ -85,9 +85,6 @@
/>
<widget name = 'Slider'
- size = '85, 12'
- />
- <widget name = 'WideSlider'
size = '-1, 12'
/>
<widget name = 'PopUp'
diff --git a/gui/themes/scummmodern.zip b/gui/themes/scummmodern.zip
index 98eabb6dec5..70137e0a9e5 100644
Binary files a/gui/themes/scummmodern.zip and b/gui/themes/scummmodern.zip differ
diff --git a/gui/themes/scummremastered.zip b/gui/themes/scummremastered.zip
index 0cba1fbbd78..dacee6f204f 100644
Binary files a/gui/themes/scummremastered.zip and b/gui/themes/scummremastered.zip differ
More information about the Scummvm-git-logs
mailing list