Since QStyle::subControlRect() used to return bogus rectangles for
SC_GroupBoxFrame, and therefore, as workaround, ManhattanStyle
calculated the position of the QGroupBox frame itself via code copied
from QFusionStyle.
6.6.3 fixes the SC_GroupBoxFrame issue, but in turn, the old workaround
fails. Therefore, this change uses old calculation when running with
older Qt and the newer one with Qt >= 6.6.3.
Fixes: QTCREATORBUG-30632
Change-Id: Ie9c6c078ba9bd0e7012192e9d887a702e307d294
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Use Utils::setWheelScrollingWithoutFocusBlocked() explicitly
when a QComboBox is placed inside a scroll area.
The Utils::setWheelScrollingWithoutFocusBlocked() is more
general and may be applied to other widgets, like QSpinBox.
This patch brings back the wheel scrolling without a modifier key
for combo boxes placed in dialogs.
Keep the unconditional scroll wheel behavior when ctrl (meta on mac)
modifier is pressed.
Change-Id: Ieea0f228cea6b59e276bd3256eb6ea5ecc5b7d14
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This way when the user clicks on the slider with the mouse the slider
jumps under the mouse and not left and right according to the slider
page.
Change-Id: If36f9d8ea82f5b200e2322758f4fc25aef5e1a04
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Most prominently QmlDesigner crashed.
Some widgets have stylesheets set, and QStyleSheetStyle sometimes asks
for pixelMetric with nullptr as styleoption.
Amends c6dc54b343
Change-Id: If1264b29af83f2a489785e3c4f3e8342716ea125
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
It was in fact just a bag of static functions. Most importantly, it
fixes a previouls introduced build error.
Amends 5975657e77
Change-Id: Ia7de8bdcf91e1763f9d3b435316a5df9993717de
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
This introduces string constants in Utils::StyleHelper. They are used by
code all over in Qt Creator to tell ManhattanStyle how to paint certain
widgets.
Change-Id: Iecca36103f80084cd5fe93fcb6b18b8fbb3a32bb
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
This makes sure that toolbutton sizes and spacings are correct in all
toolbar layout modes.
Task-number: QTCREATORBUG-29082
Change-Id: If2aad74b77c0b8dcda81478e3d345c783584cec4
Reviewed-by: hjk <hjk@qt.io>
Stores the style as int under General/ToolbarStyle. ManhattanStyle
restores the setting on contruction, just in time before widgets
get "QStyle::polished".
Task-number: QTCREATORBUG-29054
Change-Id: Ifea953261eab0d42e35a128e2f3338fbbef06a88
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Reviewed-by: hjk <hjk@qt.io>
In doTransition we start and stop animations.
Therefore the lookup for anim has to be done separately.
Task-number: QDS-9621
Change-Id: I608799a997d48acef7496a985505f896113068d1
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
- StudioStyle is implemented as an independent style dedicated to
QmlDesigner.
- QmlDesigner style part is removed from ManhattanStyle.
- Buttons are handled in StudioStyle.
- An standard palette is defined for StudioStyle.
- StudioStyle is applied to the application by QmlDesignerBasePlugin.
Task-number: QDS-9274
Change-Id: Id0a9040d82b6228a8fb215a416a916be116542bc
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
StyleAnimator moved to Utils in order to be used by other modules and
styles.
Since Utils is the most common dependency, it's chosen as the right
place of StyleAnimator.
Task-number: QDS-9522
Change-Id: Idbf55875e0c320ccfa21e1c479bf5997ea7d150d
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
* Less space is applied between the items
* Colors are modified
Task-number: QDS-9079
Change-Id: I5c9dbdf4ecdb518d509532a8e49c5eda098d760a
Reviewed-by: Henning Gründl <henning.gruendl@qt.io>
The style for slider is overridden in ManhattanStyle.
SeekSlider is modified.
Task-number: QDS-9134
Change-Id: Ib96413f2bb7918d611adf4fc19c184efae1c4f4c
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
- Margins are changed for the context menu.
- There should be more space between action text and shortcuts in
the context menu.
Task-number: QDS-8969
Change-Id: I345b3197bb702c5704a8d91d65dcb7d96f2697b4
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
* QmlEditorMenu is handled in Manhattan style.
* Icons are available for cascading menu items in macOS.
* Shortkeys hints are handled and right aligned in the menu.
* The style is customized QmlEditorMenu.
Task-number: QDS-8720
Change-Id: Iff5ebae0dce70dade5b48a1abe4232e70d6953d6
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Wheel scrolling was disabled for combo boxes in Qt Creator 9, because it
created more issues than it solved. Instead of completely disabling it,
allow wheel scrolling when simultaneously holding Ctrl.
Fixes: QTCREATORBUG-28578
Change-Id: I08bccf039b60035bf425fac95b6af6fad349f43a
Reviewed-by: Tasuku Suzuki <tasuku.suzuki@signal-slot.co.jp>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Since we also license under GPL-3.0 WITH Qt-GPL-exception-1.0,
this applies only to a hypothetical newer version of GPL, that doesn't
exist yet. If such a version emerges, we can still decide to relicense...
While at it, replace (deprecated) GPL-3.0 with more explicit GPL-3.0-only
Change was done by running
find . -type f -exec perl -pi -e "s/LicenseRef-Qt-Commercial OR GPL-3.0\+ OR GPL-3.0 WITH Qt-GPL-exception-1.0/LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0/g" {} \;
Change-Id: I5097e6ce8d10233993ee30d7e25120e2659eb10b
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
We used to elide the right part of the name, and needed to take care of
not eliding the * away in that case. Now we elide in the middle, and in
that case the * may not be added to the elided text again.
Change-Id: I646b51d315e141a65df67841e163826e7136c118
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
When Qt Creator opens more than one file with same name,
the path to be shown tend to long.
In this case last part (file name) is as important as first part.
paths in Locator and Open Document are elided in the middle of path
already.
Change-Id: I953a8068b50331f9ef20ad9efbd947b4dbcf0845
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Replace the current license disclaimer in files by
a SPDX-License-Identifier.
Task-number: QTBUG-67283
Change-Id: I708fd1f9f2b73d60f57cc3568646929117825813
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
A recent change that prevented popups from being styled as "panelwidget"
unintentionally removed the styling from the upper part of the mini
target chooser.
This change re-allows styling contents of popups (and dialogs) if they
have the "panelwidget" property set to true.
Amends: 0786e967dd
Fixes: QTCREATORBUG-26403
Change-Id: Ib85b06d0a2823a5caf736d1354cf025a6ddd475c
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Content of widgets with windowType Qt::Dialog was already excluded from
being styled as "panelwidgets". This change adds Qt::Popup to the
blacklist.
Task-number: QTCREATORBUG-26370
Change-Id: I76d07da4d8f3ae9f1c8235cdc072a04917454065
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
And consolidate the palette setting code for QLabel, QSpinBox and
QCheckBox.
Change-Id: If0dea048e2341bcbb35c52eb394d4d01efef88be
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
navigationWidgetHeight() is used in various places to calculate the
height of UI widgets that display text, e.g. the line-edits in the
search bar, hardconding a value results in the text being cut-off if
bigger fonts are used; fix the issue by using the higher value of
navigationWidgetHeight() and fontMetrics().height(), this ensures
widgets will accommodate the text.
Fixes: QTCREATORBUG-24535
Change-Id: I83ca7885840a75e05e913f7ecc77a60e61f8ef9b
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
readability-make-member-function-const finds lots of member functions
that could be made const. This change just picks getter functions that
really should be const.
readability-convert-member-functions-to-static finds non-static member
functions which do not access this. This change turns most of them
into static ones, but leaves some non static to keep the class API
consistent.
Change-Id: I004d6f7fab4375f9902f940f29b4a4f561fc7604
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
The widget can be a nullptr.
const bool isComboBox = widget->inherits("QComboBox");
Was crashing in the iso icon browser.
Task-number: QDS-3079
Change-Id: Ie7efa08ff5be094b94a835db895929158918bfcf
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Some styles set a QStyle::SH_Widget_Animation_Duration. An animation
does not go well with just-in-time population of the expanded content.
This change avoids that for all TreeViews.
Fixes: QTCREATORBUG-24834
Change-Id: I16ca4c61733d8875e713d7349ed6b99ba37ecf74
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: hjk <hjk@qt.io>
This improves the visibility of radiobuttons, checkboxes, lineedits,
groupboxes, frames and tab-close indicator in dark themes.
Scrollbars, spinboxes and the arrow button of an editable combobox are
not handled by this change.
Task-number: QTCREATORBUG-23505
Change-Id: Ieba94f3847a3c2e0da7e9b554e1026525618f49f
Reviewed-by: David Schulz <david.schulz@qt.io>