After the release of Qt Creator 13.0.0, a couple of bug reports and
comments regarding reduced legibility appeared.
They boil down to:
1) Text appears blurry
2) Text is too small
3) Text contrast is too low
This change fixes the blurryness by setting less custom font weights for
non-HighDpi systems in StyleHelper::uiFont().
Bigger texts are used for the "Session" and "Recent Project" delegates.
The text contrast is being increased by making Token_Text_Accent darker
for light themes and brighter for dark themes.
Token_Background_Muted, which is used as background color is made a bit
brighter for light themes.
Fixes: QTCREATORBUG-30579
Fixes: QTCREATORBUG-30637
Fixes: QTCREATORBUG-30650
Change-Id: I8eeb9db6854a19b0de0bcee14b10e2ef66234e06
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: hjk <hjk@qt.io>
qt_findAtNxFile does a better job at returing a suited @Nx-image for
"exotic" device pixel ratios. This change fixes for example the active
mode icon when running Qt Creator at 250% ui scaling.
Task-number: QTCREATORBUG-30464
Change-Id: Ia90ba3573fcd4af7941322d7dbc8905fe140192b
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
The "Text tokens" which are defined in Figma have an additional line
height value.
This change adds a getter function for the line heights.
Change-Id: I9513ac2f689292baf6e2c0a52fca8a1ec7f14dc1
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Figma designs have font sizes defined in pixels. We want to
define font sizes in points.
This change introduces the original font pixel size values from Figma
and provides the conversion to sensible point sizes.
Change-Id: Ic8356942a9bc033d2b5cd62863d2bd0a4cc6973b
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Font faces should be quoted. '.AppleSystemUIFont', which is the default
on macOS, would break the CSS parsing if not quoted.
This change uses single quotes (which is equivalent with double) for the
task, because inline CSS in HTML is usually already quoted with double
quotes.
Change-Id: I08d8de1131f58a9c968cf45acc636cb2b3b21700
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
As defined by the new Qt Creator design system.
Change-Id: Ib67b35ea552cf88c4b89481b72e690e04a57bbb7
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
The new font design suggests a slightly less caption font. This
has a visual impact on the mode bar labels.
Change-Id: I8d0714785b1e3f5b4c73493e0c9f45fcfc69b562
Reviewed-by: Artem Sokolovskii <artem.sokolovskii@qt.io>
This function takes a QFont and returns the relevant CSS properties as a
string. Using that CSS string in Qt's HTML supporting widgets ensures
the true to detail HTML rendering of text elements with those CSS
properties.
This change also adds an HTML sample to tst_manual_widgets_uifonts.
Change-Id: I7caf3214854f6ee62ae1211015572c640fc08dc8
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
The Qt Creator Design System defines display headings H1 and H2 with a
"Titillium Web" font face.
This change introduces the "Titillium Web" based as new H1 and H2 and
lets the WelcomeScreen code obtain them via StyleHelper::UiFont(). It is
supposed to not change the visual appearance.
Change-Id: Ia2c5ac14858e574c4ffd31af1ed80ac1781cd970
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
This change "PanelTitle" to "Caption". It is supposed to not change the
visual appearance.
Change-Id: I3342e6c80d8ce11b7ab1ac40b4395c265e1e07ec
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
This change demotes the existing H1 and H2 to H3 and H4. It is supposed
to not change the visual appearance.
Change-Id: Idc3056307f0286a2d4d276ba79125ba93d5ac428
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
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>