Custom font sizes of UI texts like titles and subtitles were usually
defined on the spot in code. With the upcoming focus on unified fonts
and colors in Qt Creator, a centralization of font styles in needed.
This adds the font getter function StyleHelper::UiFont() and the enum
UiElement that specifies types as H1..H6 and some custom ones.
Change-Id: Ie0d6e6fb51fe24d8aee6b4242941cbff45fe3853
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Artem Sokolovskii <artem.sokolovskii@qt.io>
set the DPR as a floating point number for the pixmap.
Change-Id: I354e27556dbd8a0d53cfc3e0c2b708f06406aaf5
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Qt Creator 11.0.2 changed the default DPI rounding policy to
"PassThrough" for Windows. In QtC 12, there is now a setting that allows
the user to chose the policy. The default was changed to "PassThrough"
also for Linux.
This change sets the default back to the original policy "Round" which
Qt Creator used from the beginnings of HighDPI support.
Amends: 3726f0d6c1
Change-Id: I74f2310f1b5379c8dea0bf86aee965374ca2732e
Reviewed-by: Artem Sokolovskii <artem.sokolovskii@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
QFile::exists only calls QFileInfo::exists, so this saves one
function call per invocation.
Change-Id: I41cb407345654eeead14455a4955b8b9b015aedc
Reviewed-by: Eike Ziller <eike.ziller@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>
If the base color was changed via the color picker that opens with
shift-click on the upper left toolbar area, some widgets were not
instantly updated with the new color.
This change ensures that all (visible) widgets instead of just all top
level windows get updated after changing the color. While this method is
potentially more expensive, it does not effect the start-up negatively,
because on start-up StyleHelper::setBaseColor() gets called before the
mainwindow is shown.
Fixes: QTCREATORBUG-29135
Change-Id: I227c2f243ffcd9f8210b9d2d1a47ad0494663d50
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
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>
20 string duplications warrant a centralized setter. A couple more of
them will come with the upcoming toolbar changes.
Change-Id: Ide8c680da21d5be09f968bcc0a774e062c6f0260
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Enhancing the StyleHelper by some functionality used
on the results pane of the AutoTest plugin and make use of it
inside the output formatter.
This highly improves readability depending on the current theme
when having output formatters and allows to easily re-use the
output formatter there instead of having several stuff
re-implemented.
Mainly relevant for output formatted with ANSI escape codes.
Change-Id: Ic2f5eff877656eb52e3bd2fda0ec9a015e54ea82
Reviewed-by: Alessandro Portale <alessandro.portale@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>
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>
The workaround that fixed the drawing of arrows after a change between
6.4.0 and 6.4.1 broke the drawing of arrows with Qt 6.4.0.
This change add another enforced detachment of the palette (leading to a
modified cache key) that works with Qt 6.4.0. It still works with 6.4.1.
Amends: 9d32093421
Change-Id: I8917c99488cec4fb17ed148bb3b0f95d4ed7127c
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
A change in Qt 6.4.1 influences the behavior of QPalette::setColor, so
that the arrows appear in a wrong color. An enforeced detachment of the
palette in style option works as a workaround.
Fixes: QTCREATORBUG-28470
Change-Id: I4a44ff59c368105fdf448152d83e96cdedd46495
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
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>
Round 2 - focus on sources.
For classes with initial in range [I-Z].
Try to keep the same separators between different kind of headers.
Change-Id: I8a7ab99bab8120ee72cda6433ee3dc6f260a4d76
Reviewed-by: hjk <hjk@qt.io>
It's a result of a team work consisting of yellow triangle and me.
Change-Id: I8b4812766da70e0785ae71bf0cb71357379e2514
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
- Added new icons to icon font
- Uses new drawing method for rotation cursor
Task: QDS-3131
Change-Id: Ifa8dda2630794694dd262396ca314a9b4e6675ad
Reviewed-by: Brook Cronin <brook.cronin@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Add functionality to use modes and states when generating a QIcon
from a font in StyleHelper
Task-number: QDS-2558
Change-Id: I764e8434a645d0984c6104cd1868fd5b0091d225
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
* Use ADS::IconProvider to make use of font icons
* Add support for IconProvider in FloatingWidgetTitlebar
* Add support for named font icon entities in QmlDesigner::Theme
* Add level of indirection to Constants.qml to be able to parse it
from inside C++
* Add color and HighDPI support in stylehelper
* Update RichTextEditor
* Update icon font and related constants
Task-number: QDS-1913
Change-Id: I7212f4dfe480dbb340fd042f59c69b8f5ca7a8e4
Reviewed-by: Aleksei German <aleksei.german@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Instead of "parsing", modifying and highlighting the text
after it has been added use existing code to get formatted
code beforehand.
Change-Id: I33be2950f9b9a6910ad80b10b132089f4e5f0b1c
Reviewed-by: David Schulz <david.schulz@qt.io>
Having icons of all different kinds of sizes makes it difficult to get
the painting right in all cases. It definitely fails when the szsytem is
running in multi-monitor mode with different scaling factors. Unifying
the dimensions makes it possible.
This change should not cause any visual difference in a purely scaled or
unscaled screen.
Task-number: QTCREATORBUG-18869
Change-Id: I3a864c9a86036b4f4f3b350a489077b247ca85b7
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Q*Application classes have unusually many static functions. In many
cases in our code, these functions are unnecessarily called as instance
functions, using the qApp helper.
This patch replaces many occurencies of qApp with the according
Q*Application classname.
Change-Id: I6099a419fa7bf969891269c37ed7a9e817ef5124
Reviewed-by: hjk <hjk@qt.io>
Inserting a QPixmap with active painters on it causes it to
do a deep copy of it, which is unnecessary.
Task-number: QTBUG-58653
Change-Id: I49123ffcec2e12a01c87974b7a513d68a11185d4
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This patch adds a flag which enables the "fancy" side/tool/status bars
to use the original Window color from the application palette.
The flag is disabled for all themes by default.
Task-number: QTCREATORBUG-16331
Change-Id: I1433e865e1903012d521a2cdb7083f110086e455
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@theqtcompany.com>
Using a themed text color instead of a hard-coded one and making sure
that ManhattanStyle does not tweak it.
Task-number: QTCREATORBUG-16643
Change-Id: I4bac9b29ee3c293270f39438664d617ac7591c8e
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>
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>
In preparation od a "Flat Light" theme, where shadows under the icons
would have a negative impact.
Change-Id: I2d9d3563c90336640513c1a970a432898dd63cfc
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@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>
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>
To properly support Diana's design, we need a dedicated theme color for
the separator. Also, the vertical separators have a certain margin.
Change-Id: I4d009342a9320848ec97f5c2d324bfb672650101
Reviewed-by: Alessandro Portale <alessandro.portale@theqtcompany.com>