| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Also remove the two custom progress bars from the manual test where
one has a custom background, and the other has a custom contentItem.
If you want to customize a progress bar, you need to provide
customizations for both the background and the contentItem. You cannot
provide a custom background (or contentItem) alone, since its almost
impossible to create a custom background that fits well with the
contentItem of all the other possible styles it might be using.
Change-Id: I82a87513e73f319bcecbfaed341ac4949f64c3bb
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
|
|
|
|
|
|
|
|
| |
These break the build unless Qt is configured with
-no-warnings-are-errors.
Change-Id: I4a96efc0b29db60e7945fb9739a13da81f8d4c24
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
|
|
|
|
|
| |
Change-Id: I7ef28cc93fd4acad9849fecb3d4c2cab79f0acdb
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
After testing on Big Sur, it becomes clear that
the minimum size (which is also the size of the
nine patch image) needs to be larger in order for
the combobox to render correctly.
Change-Id: Iac70efa348afb7efb0af9453dd392b40ba3a9f89
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
After testing on Big Sur, it becomes clear that
the minimum size (which is also the size of the
nine patch image) needs to be larger in order for
the text field to render correctly.
Change-Id: I74ede6415545f0ddee3fc2175772c1b07c2c3999
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
After running the "leaks" app in Instruments, several
places showed up to leak memory. This patch will add
auto release pools at those places to stop that
from happening.
Change-Id: If7f49290fde60e71d1a40c10bc3d538df6c1da5c
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
|
|
|
|
|
|
| |
Change-Id: Idec0507a8bbdfc345e731a9e376ef8dd00534946
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|
|
|
|
| |
Change-Id: Iad09b9f6080994528d65dcddc9eda49dbba356f7
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In windows style, the focus rect is drawn when the button is drawn,
but we are only drawing the bevel, so the focus rect was not drawn.
We move the logic of drawing the focus rect so that it is drawn when
drawing the bevel instead.
Also, we have to set the QStyle::State_KeyboardFocusChange in order
for the focus rect to be drawn
Change-Id: I4463ae1dd0f23ecc5bb0a84c563fda33dc6e93c8
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
|
|
|
|
|
| |
Change-Id: Ie48002b083615afd4f8f8ab3b1303a8f5c39f81b
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|
|
|
|
| |
Change-Id: Ied2055866a67798ce60105e7251740a3e66b38db
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|
|
|
|
|
|
|
| |
This was wrongly added in 2275a0896c7b7e648641f4c6977a02006a581577,
but I didn't realize we already had qquickdrawutil.*.
Change-Id: I873c0e2fcd2cb6df46966c59882db3eff33bc744
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
|
|
|
|
|
|
| |
Change-Id: Ia6387857ba012ba7f6df453e64dd9419f7979db8
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Up till now, all images have been scaled using nine patch images
with margins set to be at the center. This was doomed to be too simplistic
at some point, at that point is now (when working on comboboxes).
So instead, calculate the nine patch margins from the style. This
will let the different styles set pixel perfect margins per control that
matches the image they draw. If left unspecified by a style, the default
implementation in QCommonStyle will return the old logic of using the center.
We also add support for specifying if an image can be scaled horizontally
or vertically by setting the right or bottom nine patch margin to -1
respectively. E.g on macOS, an NSButton cannot be scaled vertically, so the
image we draw will not look native if we do.
Change-Id: Icaf232748b8d15f06f9b289e164b5c8fb86a6c7b
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
|
|
|
|
|
|
|
|
| |
It also includes qwindowsxpstyle and qwindowsvistastyle,
but they do not compile at the moment
Change-Id: Ie9ce0bf99d620d65534c2660150117e4747f5c86
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
Set implicitWidth/Height to be the same as in TextField.qml in the
default style (and the same for TextArea). And fix the mac style to
return correct values when calculating the minimum size. Combined, this
should ensure that we improve how we take the content size into account
when calculting the implicit size of a TextField (especially on macOS).
Change-Id: I39bc8bb0f238dd29d5fe33fc32d888b82d020b0e
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|
|
|
|
|
|
| |
This old code was especially wrong when using Dark Mode on macOS.
Change-Id: Ia75b7868a03867cf9b6105f8b99dfb328ab00c41
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|
|
|
|
| |
Change-Id: Ide8f2910c54a378c8c9d03554718de54feb9cf20
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|
creating native styles
This is the initial patch for adding native style support to controls2.
The gist of the patch is that it copies QStyle from widgets (including the
mac plugin style), remove all notions of widgets, tweak it as needed, and
make it compile inside the qtquickcontrols2 repository as a separate
QML plugin (QtQuick.NativeStyle).
The "new" QStyle is then used to draw primitives onto nine-patch-images that can
be rendered by the scene graph. Each such primitive/image will be wrapped by a
QQuickStyleItem (which is a subclass of QQuickItem). E.g a button background will
be implemented by QQuickStyleItemButton.cpp. This item can then be placed anywhere
in the QML code to draw a native-looking button background.
Controls2 has its own styling API, where a style consist of a set of QML files
that extend template controls written in C++. To enable native styling, we simply
follow the exact same approach; We create a style folder per platform alongside
the other styles in controls2. Each style will contain a set of qml files for the
controls (Button.qml, Slider.qml, etc), and inside each control, the style items
will be used to draw the default delegates. Since it's likely that each such
qml file will be implemented equal in all the desktop styles (but not always), the
native style plugin contains a set of default controls (e.g DefaultButton.qml) that
a platform style can choose to inherit from and extend as needed.
Included is also an example called "DesktopGallery" that can be used to
test and view the controls.
Change-Id: I8b45aa7d493930f552d3ad2e3e3e7184129a9d6c
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|