[vlc-devel] [PATCH 3/3] qml: use size values from VLCStyle in CheckedDelegate widget
Pierre Lamot
pierre at videolabs.io
Wed Nov 18 13:23:02 CET 2020
On 2020-11-18 11:42, Prince Gupta wrote:
>> On 2020-11-17 20:22, Prince Gupta wrote:
>>> ---
>>> modules/gui/qt/widgets/qml/CheckedDelegate.qml | 3 ++-
>>> 1 file changed, 2 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/modules/gui/qt/widgets/qml/CheckedDelegate.qml
>>> b/modules/gui/qt/widgets/qml/CheckedDelegate.qml
>>> index 0aaf1f2c17..d41c7db810 100644
>>> --- a/modules/gui/qt/widgets/qml/CheckedDelegate.qml
>>> +++ b/modules/gui/qt/widgets/qml/CheckedDelegate.qml
>>> @@ -27,6 +27,7 @@ T.ItemDelegate {
>>> id: control
>>>
>>> checkable: true
>>> + font.pixelSize: VLCStyle.fontSize_large
>>> leftPadding: VLCStyle.margin_xlarge
>>> rightPadding: VLCStyle.margin_xsmall
>>>
>>> @@ -41,7 +42,7 @@ T.ItemDelegate {
>>> text: VLCIcons.check
>>> visible: control.checked
>>> height: parent.height
>>> - font.pixelSize: 24
>>> + font.pixelSize: VLCStyle.dp(24, VLCStyle.scale)
>> would it makes more sens to use a metric like this
>> VLCIcons.pixelSize(VLCStyle.icon_something)
>> to be more consistent with the other Icons?
>
> idk, none of the currently available metric seems to give the desired
> result,
> VLCStyle.icon_medium looks too big while VLCStyle.icon_normal too
> small.
>
> VLCStyle.icon_normal https://imgur.com/a/W8OLsr2
> VLCStyle.icon_medium https://imgur.com/a/NHqu58b
> VLCStyle.dp(24, VLCStyle.scale) (currently used)
> https://imgur.com/a/TzNQG3p
You can still provide a specific size rather than using the pre-defined
sizes if this looks better.
the issue is more about using VLCIcons.pixelSize consitently for icons
rather than using a specific size here.
If we need to modify the icon mechanism later on, it will be easier if
every icons use the same metric.
>>> color: "white"
>>> verticalAlignment: Text.AlignVCenter
>>> }
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel
More information about the vlc-devel
mailing list