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>
Some include of QPainterPath was removed in Qt, causing errors like:
easingpane\easinggraph.cpp(258): error C2079: 'path' uses undefined class 'QPainterPath'
easingpane\easinggraph.cpp(275): error C2027: use of undefined type 'QPainterPath'
easingpane\easinggraph.cpp(305): error C2664: 'void QPainter::drawPath(const QPainterPath &)': cannot convert argument 1 from 'int'
to 'const QPainterPath &'
easingpane\easinggraph.cpp(305): note: Reason: cannot convert from 'int' to 'const QPainterPath'
easingpane\easinggraph.cpp(305): note: use of undefined type 'QPainterPath'
...
Add the missing include statements.
Change-Id: I4f3383cbcec891a52480a683c9c76ed5deee2b2a
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
For example the "Ignore Whitespace" button in the diff viewer
Change-Id: I9882b9d2f3e22635bfbb047904ef284dd515db9f
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
The extension image gets queried via QStyle::standardIcon() instead of
QStyle::standardPixmap(). That's why so far our extension was never
drawn with our own icon.
The icon .png needed to be resized in order not to be resampled in @2x
mode.
Change-Id: I27ae4e5872c18421e5d40271b01cb9daf8adc8bc
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Since dccf5a5ae7 the submenus have the
parent menu as an actual parent widget. That makes ManhattanStyle handle
them differently, because they are now children of the menu bar, and
therefore considered "panel widgets" to be styled.
An undesired side-effect is that ManhattanStyle decides to style the
submenu arrows itself then.
The patch makes ManhattanStyle not style arrows if they are painted as
part of a menu.
Fixes: QTCREATORBUG-21376
Change-Id: Ia5556c7327c3f0c2f21cadc86047bec785da27df
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
Making sure that the text color in the combobox adapts to the background
color in lightColored mode.
Change-Id: I63ffbecde30be837540c0d4a1074ccbcbd31c756
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
QTabBar style was recently updated in QMacStyle (see 175f33ed855b0).
New macOS style requires all tabs to be moved one pixel to the left, so
there's 1 pixel separator line visible between them which is always
left border of the tab with higher index. But once you start moving
a tab, you'll notice that each tab has both left and right borders.
ManhattanStyle is a proxy style what means it falls back on some other
style which can be either platform-specific ("Flat" is an example) or
cross-platform ("Dark" is based on QFusionStyle). Now, even though
ManhattanStyle does not implement a custom look of QTabBar, it does
this 1 pixel adjustment for the very first tab
(QStyleOptionTab::Beginning) and QStyleOptionTab::OnlyOneTab no matter
what style is actually used.
Unfortunately, QStyleOptionTab::TabPosition enumeration does not have a
specific value for the tab which is being moved, so it's painted as
OnlyOneTab. As a result of this additional adjustment left border of the
moving tab goes out of pixmap's geometry on macOS and it looks like it
does not have left border.
This is not right to modify QTabBar's geometry for any theme arguing
it as "otherwise it looks bad" because in general case this statement is
wrong: even Fusion style draws 2 pixel wide line on the left of each
tab. Proper solution would be to implement a custom look of QTabBar in
ManhattanStyle.
Change-Id: I9e110f3195d068c6101c412e142d3a1ff7e80852
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Commit 15fbfaf2e9 moved many images into
utils, but some paths in the source were not adjusted accordingly.
Change-Id: I6d32754c41455271c0bfcedf0777a38fbeca67ab
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
This way we can use them from libraries, not only from plugins.
Change-Id: Ic35cfd5f04d638d87606bf272b2c00ded1267c1b
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
The toolbar border/separator lines for flat themes need to be a bit
lighter.
This change introduces StyleHelper::toolBarBorderColor and puts it into
use for drawing all toolbar borders.
Change-Id: Icef20759ce282e768f6ba867474e506b9230b864
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@theqtcompany.com>
We need a new Theme flag for that. And it will initially only be set for
the flat light theme.
Task-number: QTCREATORBUG-16633
Change-Id: Id723e128364eb6186fe8e28e2087a3698b1bf632
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
That separator under the Menu is drawn in the Classic and Flat themes.
This change ensures that it is also drawn for themes with "FlatMenuBar".
The "Flat Dark" and "Flat Light" need it.
Change-Id: I43c932cfc4634330a08f86a33c9d74555e420a2a
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@theqtcompany.com>
Theme::widgetStyle with its two possible return values makes less sense
than a bool flag. Especially since we already have several separate
theme flags for ui elements which might be "flat" or not.
Change-Id: Ic521bb58c04386b735b784079de05e521bc1f45f
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Using theme colors rather than hard-coded ones and at the same some
simplification.
This is needed for an upcoming "Flat Light" theme.
Change-Id: I8a8715a16d1b246c5228978633143eb64d371701
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
The painting code path for flat themes did not handle the disabled
state. This change catches up on that, and also suppresses the painting
of the hover border in disabled state.
Change-Id: I29d50be4549c81a25f976c61f6d4541862d2925e
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
...and making sure that items of a disabled combobox are visibly
disabled.
This prevents users from clicking on the Threads label before debugging
even started.
Change-Id: I59cc9b7e875fe8c126a9ee4221ff9d8322e4b1a8
Reviewed-by: hjk <hjk@theqtcompany.com>
That's flatter and more consistent with the flat pressed buttons in the
mode bar and status bar.
Change-Id: I29edd2b184b8468005bffe8fe8c9f2e275355df1
Reviewed-by: Alessandro Portale <alessandro.portale@theqtcompany.com>
This change makes arrows in e.g. ComboBoxes themable. This also improves
the clear distinction between enabled and disabled state.
Change-Id: If40dcd3e162ad71d1bc6507c047203aa60e09ee6
Reviewed-by: Alessandro Portale <alessandro.portale@theqtcompany.com>
Since StyleHelper::baseColor now returns a themed color and
QColor::lighter() lightens up dark colors relatively little, we should
to use a themed color for the background instead.
Task-number: QTCREATORBUG-15930
Change-Id: I256ddcf946a14af6937c324a76e3f3a24919ae3b
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This change makes sure that the "UI coloring" feature respects the
original brightness of the current theme. It prevents dark themes from
getting a too light recoloring and vice versa.
Extra benefit: this allows to remove much recently introduced code.
Change-Id: Ib2c96e7ed172a4cc97520aa4b5d180cc6353c661
Reviewed-by: hjk <hjk@theqtcompany.com>
The flat OutputPaneToggleButton now has the same hover and selected
colors as the sidebar items and toolbar items. This changes the
appearance in the dark theme a bit, and I hope in a good way.
Change-Id: I52826c6d1c4539f799c74580f195a95609ea0416
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Inspired by numerous user feedback, I want to turn off the theming of
the menu bar for the new flat theme, and make it look like in the
default theme. At the same time, I want to leave the "dark" theme as it
currently is.
This patch adds a theme flag FlatMenuBar and turns it off for the new
theme.
Change-Id: I9bba056a27fab7a634b45324e3fe8cd26f50df74
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>