| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
The style declares several QML dynamic properties which are meant to be
private. Hide them using __ convention.
Pick-to: 6.9 6.8
Change-Id: I4317d2ee7072a72fda1736fc8c9165a980889d95
Reviewed-by: Richard Moe Gustavsen <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
As it stood, the background delegate of a Menu would draw its
drop shadow on the outside of the delegate, and therefore also
on the outside of the Menu as a whole. This works fine for
Popup.Item, since an Item is allowed to draw out-of-bounds. But
for Popup.Window, this would fail.
Instead, the correct solution in this case is to draw the shadow
_inside_ the delegate, and instead make the whole menu bigger by
adjusting the insets instead, to take the shadow into account.
In order to be able to do this, we also need to teach StyleImage
to optionally draw the shadow inside the bounds.
Pick-to: 6.9 6.8
Change-Id: I306e511abca44f4f86ee18a16740f679cf987ac1
Reviewed-by: Doris Verria <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
| |
[ChangeLog][Controls] TextField and TextArea now provide a ContextMenu
by default. If you already have a custom context menu for these types,
ContextMenu will not open its own on e.g. right click.
Fixes: QTBUG-35598
Pick-to: 6.9
Change-Id: I0897a7ba5e1b5b6d5425c80cbc6f2550c904605b
Reviewed-by: Mitch Curtis <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Follow the approach with FocusFrame and move StyleImage.qml to the
private FluentWinUI3.impl module instead. Add deprecation warnings to
the original file.
[ChangeLog][QtQuick][Controls][FluentWinUI3] StyleImage.qml is
deprecated in the module's public QML API and moved to the private
impl module instead.
Pick-to: 6.9
Change-Id: I2a536591abb2172a1f7d7a052e88f0c2f58cd481
Reviewed-by: Mitch Curtis <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
FocusFrame.qml was included in the FluentWinUI3 public module imports,
despite not providing any documentation. This component is an
implementation detail and should not be part of public QML API.
Add deprecation warnings in the original file and move it to the
private impl module instead.
[ChangeLog][QtQuick][Controls][FluentWinUI3] FocusFrame.qml is deprecated
in the module's public QML API and moved to the private impl module instead.
Pick-to: 6.9
Change-Id: I74c8c9a03ccc1f7b33d6fb814ca1faeca57b0545
Reviewed-by: Mitch Curtis <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When calling moveToItem() when the focus object changes, we were
explicitly assigning the visible property. This caused the previous
binding declared on the visible property of the frame to be removed.
To fix, don't assign the visible property on moveToItem, as the
binding on the target item and its visibility will take care of that.
Ammends 945c3a98edac75cac082b1719c380a0bae861944.
Pick-to: 6.8 6.9 6.5
Change-Id: I504a0e00000c5fdfb8c5193b9fa2314199a7c4e0
Reviewed-by: Jan Arve Sæther <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Popup uses a Pane as its popup item, so now that Pane reflects its
explicitly set contentWidth/Height through implicitContentWidth/Height
we can use the same expression for implicit width/height as regular
controls, which hooks us into the safe area binding loop detection
as well.
Pick-to: 6.9
Change-Id: I3709978dae0271d7daf44fc6988f09f03df15b1f
Reviewed-by: Mitch Curtis <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A ToolBar and MenuBar is commonly placed in the header/footer/menuBar
of an ApplicationWindow, where we don't do any automatic padding to
account for the safe area.
By adding the safe area margins as padding to the controls, we ensure
that the control's background flows into the non-safe area, while the
content item of the control (the toolbar or menu bar content) is kept
within the safe area.
Pick-to: 6.9
Change-Id: I5fad7394beaa01ae8ed142e4e2e42c5bffaab9fa
Reviewed-by: Richard Moe Gustavsen <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Now that Container reflects its explicitly set contentWidth/Height through
implicitContentWidth/Height we can use the same expression for implicit
width/height as regular controls, which hooks us into the safe area
binding loop detection as well.
Pick-to: 6.9
Change-Id: If0a710a5eb4a35c91d02d7170b5e03e457e6bc12
Reviewed-by: Oliver Eftevaag <[email protected]>
Reviewed-by: Richard Moe Gustavsen <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
| |
Now that Pane reflects its explicitly set contentWidth/Height through
implicitContentWidth/Height we can use the same expression for implicit
width/height as regular controls, which hooks us into the safe area
binding loop detection as well.
Pick-to: 6.9
Change-Id: Ie31b740a1e405341fc5f0ed9673b213292e4afd9
Reviewed-by: Oliver Eftevaag <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We don't have a Qt::FocusReason enumerator value that represents the
focus reason being arrow keys, so for cases that an item gains focus
due to arrow-key navigating, the focus reason will be OtherFocusReason.
The FluentWinUI3 style only draws the focus frame when the focus
reason was Tab/Backtab to avoid drawing it for focus reasons other
than keyboard focus, but it should draw it for when focus shifts due
to arrow keys too, so include Qt::OtherFocusReasons in the conditions.
Also, reset the focus frame when we can't find a focus object AND
when the focus reason is none of the above in order to avoid showing
the frame around an item that lost focus because of another reason.
Fixes: QTBUG-130328
Pick-to: 6.8 6.9
Change-Id: I6cbc13124a0e672bf453896bafd0ba1d8656449e
Reviewed-by: Mitch Curtis <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When we didn't find a new target focus item we would destroy the focus
frame object and recreate it the next time a new valid focus item is
found. This can be expensive due to cleanup and reallocation calls,
and it can also lead to a crash during parent destruction because the
focus frame gets deleted as part of the parent item's destruction,
potentially triggering changes in the focus object that result in
another attempted deletion of the focus frame.
Instead, in case of an invalid new focus item, we should just set the
focus frame's target item to null when calling moveToItem. This
will handle that case by making the frame invisible and setting its
parent to null.
Pick-to: 6.9 6.8
Change-Id: Icf46af0ce3c79bab09343a2262688fb33ed8a4d9
Reviewed-by: Richard Moe Gustavsen <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
| |
Now when we call setTransparentForPositioner(true) on the focus frame,
there is no need to keep the root item with size(0,0). The only purpose
of having that item was so that layouts would ignore the focus frame.
Pick-to: 6.8 6.5 6.9
Change-Id: I6224dced83c054b573eb682997e238a0cf1f4776
Reviewed-by: Jan Arve Sæther <[email protected]>
Reviewed-by: Doris Verria <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Applies to the focus frame on macOS, Windows and FluentWinUI3 style.
This will ensure that it is excluded by layouts and positioners.
Previously, layouts excluded items with 0x0 size, so setting the size of
the focus frame to 0x0 worked then. This is not the case any longer.
Pick-to: 6.8 6.5
Fixes: QTBUG-129427
Change-Id: I399317f8a7a6b941803556e7ffb2208ad3237726
Reviewed-by: Doris Verria <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In QQuickFocusFrame, we connect to QGuiApplication::focusObjectChanged
signal and draw the focus frame around focusObject() of qGuiApp, which
as per its implementation, is the focusObject() of the app's
focusWindow(). However, in the case of QQuickWidget, its
offscreenWindow will never become the focusWindow of the application
because it doesn't have a native handle. Also, since
0dbc575c1a8359534761167a5f5f1e29abedd51d QQuickWidget intentionally
doesn't override the focusObject method to return the focusObject of
its offscreen window because that would bypass needed event handling
logic in qquickwidget.
That is why if a qquickwidget has active focus, qGuiApp will report
the qquickwidget itself as its focusObject, rather than the focusObject
inside of the widget. However, we still do propagate focus object
changes inside the qquickwdiget's offscreen window up to the top
level widget and the application, so that when the offscreen's window
QQuickWindow::focusObjectChanged is emitted, the equivalent signal
in QGuiApplication will also be emitted.
That is why in qquickfocusframe we should rely on the signal parameter
instead, which represents the right focus object, rather than query
qGuiApp::focusObject().
While we're at it, reset the focus frame if no item inside the quick
window currently has active focus, otherwise we would still show
a focus frame even if the quick window lost focus.
Note: Ideally qGuiApp::focusObject() should give us the same object as
the QGuiApplication::focusObjectChanged signal parameter, but that
can require more work as the focusObject() of the application will
then receive key events and qquickwidget relies on handling those key
(and other) events itself.
Fixes: QTBUG-128931
Pick-to: 6.8 6.8.0
Change-Id: Id86a4e9dfd6b2bda5cc9ea633305e71d86fcdb5f
Reviewed-by: MohammadHossein Qanbari <[email protected]>
Reviewed-by: Richard Moe Gustavsen <[email protected]>
|
|
|
|
|
|
|
| |
Task-number: QTBUG-125279
Pick-to: 6.8
Change-Id: Ia1f35705cd1f6ff912294ddce172bde381789fbb
Reviewed-by: Mitch Curtis <[email protected]>
|
|
|
|
|
|
| |
Pick-to: 6.8
Change-Id: Ib2b98ba7f69d70b251bfa17e35ee121c7728b916
Reviewed-by: Mitch Curtis <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add a FocusFrame component that follows the active focus item,
mirroring the approach used by the native styles with QQuickFocusFrame.
In the future, this should probably move out of the native style and
serve as a common solution across all styles.
Task-number: QTBUG-125279
Pick-to: 6.8
Change-Id: I577d0b783c36bc7e146a7e02051195d78a11ca60
Reviewed-by: Mitch Curtis <[email protected]>
|
|
|
|
|
|
| |
Pick-to: 6.8
Change-Id: I962b1d9a3aa0e2dbcdc9d262088de00e5abd3322
Reviewed-by: Mitch Curtis <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
| |
Add Dialog and DialogButtonBox.
While at it, remove them from the list of not-yet supported
controls in the Fluent style docs, together with other controls
that have already been implemented.
Pick-to: 6.8
Change-Id: I6abe0cae8712a999a5491b5ec1a904df56d38d0d
Reviewed-by: Mitch Curtis <[email protected]>
|
|
|
|
|
|
|
| |
Task-number: QTBUG-125279
Pick-to: 6.8
Change-Id: I400c3ccc27088427481a86cc937597675649fb3d
Reviewed-by: Mitch Curtis <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We want to be able to support custom palette.accent and palette.button
colors for the Button/ToolButton. To do that, use QML instead of images
for the button background and factor it out in reusable component
ButtonBackground.
Remove previously generated images for the button/toolbutton backgorunds
but keep using geometry information generated from the stylegenerator.
Pick-to: 6.8
Change-Id: I6f195b32142d06c96833ac3d9184da9f8bbd22ba
Reviewed-by: Mitch Curtis <[email protected]>
|
|
|
|
|
|
|
|
|
| |
The horizontal/vertical paddings need to be inverted depending on
orientation.
Pick-to: 6.8
Change-Id: Ia9d516088a749e0c29e70d06bc24a83f1ffb6f3b
Reviewed-by: Mitch Curtis <[email protected]>
|
|
|
|
|
|
|
|
|
| |
Checkmark indicator was slightly different as pointed out by baseline
testing.
Pick-to: 6.8
Change-Id: I5984a2de7853c3c8008d8e7215106df8f2f12a6f
Reviewed-by: Mitch Curtis <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
On Windows platforms we were using the platform theme's palette to
construct the FluentWinUI3 style's palette with the motivation that
the colors as gotten from the system's APIs in qwindowstheme would be
the correct ones for the style. This is not the case as these APIs
represent the colors for old Windows10 platforms and do not correspond
with the modern WinUI3 colors.
That is why we need to override many of these palette roles in the
FluentWinUI3's style palette. These colors need to be hardcoded even
for Windows platforms as there are no APIs that we can use to retrieve
them. The color entries are taken from the official Figma files for the
style. The accent color is an exception and that we can safely retrieve
from the system APIs.
As a drive-by, resolve the style's palette based on the platform theme
for all platforms, not only on Windows, as we want to use the system's
accent color no matter the platform.
Partially reverts 8516ddf690440cd33e3332e8cb2d049ed0032954.
Pick-to: 6.8
Change-Id: I360fc30bd04fac9b04a8ffe0e99791349ad365a6
Reviewed-by: Mitch Curtis <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add Menu, MenuItem, MenuBar, MenuBarItem, MenuSeparator. Menu is a
popup so reuse assets from the Popup control. Similarly, reuse assets
and config from ToolBar/ToolButton for MenuBar/MenuBarItem since they
have a similar look.
As a drive-by, fix some sizes and colors in the Figma design for these
components.
Task-number: QTBUG-125279
Pick-to: 6.8
Change-Id: Ib97103be492dd7df21ce6c76520fd9a67c0bbd37
Reviewed-by: Mitch Curtis <[email protected]>
|
|
|
|
|
|
|
| |
Task-number: QTBUG-125279
Pick-to: 6.8
Change-Id: I667cd760dd42f648659046d0b95d16d703610067
Reviewed-by: Mitch Curtis <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
| |
Use ColorImage and primitive QML types for indicators in order to
support accent color customization for CheckBox, CheckDelegate,
RadioButton, and RadioDelegate.
As a drive-by, fix indicator colors for SwitchIndicator.
Pick-to: 6.8
Change-Id: Ic1806b5c8cd5c51d2a92f9b30483a117c06e162f
Reviewed-by: Mitch Curtis <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Use existing assets for ItemDelegate and CheckBox, RadioButton, and
Switch respectively.
Factor out SwitchIndicator into separate component so that it
can be shared by Switch/SwitchDelegate and use QML instead of
images for switch indicator in order to support custom accent
color
Task-number: QTBUG-125279
Pick-to: 6.8
Change-Id: I738a655439ca07745968f4775d4e8c123329fa25
Reviewed-by: Mitch Curtis <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Highlighted text represents the color of selected text and should be
white on both light and dark mode. We were incorrectly using this role
for the button text color for checked and highlighted buttons, which
does not correspond to always light text. Fix this for Button and
ToolButton as well as set this palette role to white color.
Pick-to: 6.8
Change-Id: Ia79d3e86cc038525e4c566d368f418ee5c56f89f
Reviewed-by: Mitch Curtis <[email protected]>
|
|
|
|
|
|
|
|
| |
Add BusyIndicator and unblacklist its tests.
Pick-to: 6.8
Change-Id: If42d53fcf60b897e98bd68465de662633d1d306e
Reviewed-by: Mitch Curtis <[email protected]>
|
|
|
|
|
|
|
|
|
|
| |
Don't hardcode colors for pressed/hovered indicators, but rather use
the control's palette and the Qt.rgba function to get the right colors.
In this way the style will look correct when the palette changes.
Pick-to: 6.8
Change-Id: I3af986d027e920efa2d8ef90b5c4710b194bfd80
Reviewed-by: Mitch Curtis <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When on Windows11+ platforms, use system colors as reported by the
platform theme.
Also don't use BrightText color role for pressed button text in the
FluentWinUI3 style, but hardcode this color. We do the same in the
windows11 widgets style. This is because the windows theme uses the
BrightText role for a different purpose.
Task-number: QTBUG-125279
Change-Id: I76c710145e0f9fdfbfe058300ba4477020bd62e9
Pick-to: 6.8
Reviewed-by: Santhosh Kumar <[email protected]>
|
|
|
|
|
|
|
|
|
| |
Regenerate config after a fix in the stylegenerator tool which fixes
the geometry calculations to not account for "invisible" strokes.
Pick-to: 6.8
Change-Id: I58497b644068455153998314f69ee328bbe4e7a4
Reviewed-by: Richard Moe Gustavsen <[email protected]>
|
|
|
|
|
|
|
| |
Task-number: QTBUG-125279
Pick-to: 6.8
Change-Id: I5a7d791fa121a054bd6f4d3f375b17a05c8378c7
Reviewed-by: Mitch Curtis <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
As mentioned in QTBUG-95540, using the latter provides better type
information for tooling, and avoids the "this property only exists on
the object if Quick has been imported" issue.
Replace QtQml import in Fluent style's Config.qml with QtQuick to
provide access to the Application type.
Fixes: QTBUG-126512
Pick-to: 6.5 6.7 6.8
Change-Id: I4aac22e54f3b522f74acafd467ce22139352c9dd
Reviewed-by: Ulf Hermann <[email protected]>
|
|
|
|
|
|
| |
Pick-to: 6.8
Change-Id: I278ed628f3810d315480cd2a4362fff6fb350275
Reviewed-by: Richard Moe Gustavsen <[email protected]>
|
|
|
|
|
|
|
| |
Task-number: QTBUG-125279
Pick-to: 6.8
Change-Id: Id74e7ed3512327dcd8c7014a81fd81c24ec6f82b
Reviewed-by: Mitch Curtis <[email protected]>
|
|
|
|
|
|
|
| |
Task-number: QTBUG-125279
Pick-to: 6.8
Change-Id: I0e7a985f16244e495b8e210553646b9d5a279378
Reviewed-by: Mitch Curtis <[email protected]>
|
|
|
|
|
|
|
| |
Task-number: QTBUG-125279
Pick-to: 6.8
Change-Id: I2fc049a14b78f99da27e5c9e4312251e35f3f369
Reviewed-by: Richard Moe Gustavsen <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
What changed:
1. Default height for buttons is 32 (from WinUI3 Figma design)
2. Radius for textfield is 4 (from WinUI3 Figma design)
3. Indeterminate progressbar doesn't have visible groove
4. TextArea/TextField paddings and height fixed according to
guidelines
5. Geometry calculation was fixed in the stylegenerator tool to
include strokes drawn outside the boundaries of the control. This
means that some of the paddings, sizes, and coordinates may have
changed.
Pick-to: 6.8
Task-number: QTBUG-125279
Change-Id: I58df66b4adc022eb39a0b09554ef2348939a740e
Reviewed-by: Richard Moe Gustavsen <[email protected]>
|
|
|
|
|
|
|
| |
Pick-to: 6.8
Task-number: QTBUG-125279
Change-Id: Ic5d8f0f503fbbc0019546423ea6ab0ee8fb2d627
Reviewed-by: Richard Moe Gustavsen <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add TabBar/TabButton controls and fix tst_tabbar to:
- take into account TabButton's background when calculating its
expected width
- most of the tests assume TabBar's paddings are 0, so explicitly
set them to 0
Pick-to: 6.8
Task-number: QTBUG-125279
Change-Id: I0a68fc085baee250925f30dee6636ae71d17e82c
Reviewed-by: Richard Moe Gustavsen <[email protected]>
|
|
|
|
|
|
|
| |
Pick-to: 6.8
Task-number: QTBUG-125279
Change-Id: Ic0a63950a5e2e2595bacd15e7bf4a188d5afa001
Reviewed-by: Mitch Curtis <[email protected]>
|
|
|
|
|
|
|
|
|
| |
Don't use images for the track but use QML Rectangle with accent color.
Pick-to: 6.8
Task-number: QTBUG-125279
Change-Id: I3175c9bb7afc7932de6541833cb3a3deb05dfc22
Reviewed-by: Richard Moe Gustavsen <[email protected]>
|
|
|
|
|
|
|
| |
Pick-to: 6.8
Task-number: QTBUG-125279
Change-Id: I33193802a314c6d0b7fbf5df4a13286cdda90c37
Reviewed-by: Richard Moe Gustavsen <[email protected]>
|
|
The style is based on the WinUI3 design system, which follows the
Fluent design.
Task-number: QTBUG-125279
Change-Id: Ie92c35a5c1d3eafdbb377d1c49df4b8cc84e1e98
Reviewed-by: Richard Moe Gustavsen <[email protected]>
|