Commit Graph

4 Commits

Author SHA1 Message Date
Fabian Kosmale a23fc3087d coffee: Colors: Add some type safety
Both "light" and "dark" were plain QtObjects, who happened to have the
same additional properties. Instead, declare the properties once in an
inline component, and use it as the type instead of "var".

Pick-to: 6.10
Task-number: QTBUG-138164
Change-Id: Icb9f2cad2c05aa256ea0e6d5bde47e5a0a7f6923
Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io>
2025-07-18 10:04:16 +02:00
Fabian Kosmale 70f1b0756e coffee example: fix some unqualified id warnings
Task-number: QTBUG-138164
Change-Id: I4d708d23218a87d568fe18b322d0b7bb182d2ea0
Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io>
2025-07-18 10:04:11 +02:00
Konsta Alajärvi 4c3e6e6152 Fix Coffee Machine clipping UI elements on lower resolution displays
Reason for these changes is that it was discovered that some of the
UI elements of the re-designed Coffee Machine example did overflow the
target device display with lower than ~1080x1920 display resolution.

Added states to coffee cards that will scale the cards and their content
down if target device screen resolution is lower than set limit.

Added state to home component where text components will be scaled
down in target device screen resolution is lower than set limit.

Added some colors to Colors.qml to remove hardcoded color values.

Added states to sliders in Settings.qml and in CustomSlider.qml
that will scale them down if target device screen resolution is
lower than set limit.

Scaled the custom buttons heights down a bit throughout the
app to make them fit on screen.

Added state to progress page that will scale the caption text
down if target device screen resotion is lower than set limit
and set minimum width and height to dialog component so that
the text will not overflow its container.

Added states to ready page that will reduce the row spacing of the
grid component and scale the caption font size down if target device
screen resolution is lower than the set limit.

Tested successfully  with Android emulators with screen resolution
ranging from 320x480 to 1440x3120.

Removed multiple property changes regarding text sizes in
Settings.qml and replaced them by binding the text objects
font size to a new property int that will be modified through state.

Added the missing when condition in state change to change
the font size in Setting.qml.

Renamed ambiguous id's

* Removed unused property aliases

* Re-applied missing qdoc snippet tags to Settings.qml which were removed
by mistake. This should fix one of the qdoc warnings in CI.

Fixes: QTBUG-116402
Pick-to: 6.7 6.6
Change-Id: I2524be43f943494f5ab7b2689b222a977996dac6
Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io>
2024-01-10 07:19:54 +00:00
Konsta Alajärvi b40aaf48ca Re-design for Coffee Machine example
Implementing new design for Coffee Machine example, more information
on how the new design is going to look like in QTBUG-116402 and in
its subtasks.

Removed unused imports folder.

Changed the names of Home.ui.qml to Home.qml and FilledCup.qml to
Cup.qml in Coffee.qrc file.

Changed the names of the files stated above also in qmldir.

Fixes: QTBUG-116403
Fixes: QTBUG-116402
Task-number: QTBUG-116404
Change-Id: Ib4d33e28ce1e3f268172007e85f36eb1280d11a4
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2023-11-24 11:42:21 +02:00