Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qwaylandfractionalscale.cpp
Go to the documentation of this file.
1// Copyright (C) 2022 David Edmundson <davidedmundson@kde.org>
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
5
7
8namespace QtWaylandClient {
9
10QWaylandFractionalScale::QWaylandFractionalScale(struct ::wp_fractional_scale_v1 *object)
11 : QtWayland::wp_fractional_scale_v1(object)
12{}
13
14
19
21{
22 qreal preferredScale = scale / 120.0; // hardcoded denominator determined in the spec
23 if (preferredScale != mPreferredScale) {
24 mPreferredScale = preferredScale;
25 Q_EMIT preferredScaleChanged();
26 }
27}
28
29}
30
31QT_END_NAMESPACE
void wp_fractional_scale_v1_preferred_scale(uint scale) override
Combined button and popup list for selecting options.