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>
The flat theme as defined by Diana has the motto:
"Remove unnecessary lines, avoid gradients".
This patch implemets that for the flat themes, while
leaving the default theme unchanged.
The only tweak that touches all styles is that
"Styled Separator" has for consitency now the same look
as standard toolbar separators.
Change-Id: I80ab0d9bf5ca20ab0daa57baf5a7e095a4a0c653
Reviewed-by: Alessandro Portale <alessandro.portale@theqtcompany.com>
This patch adds flat side bar icons according to
http://blog.qt.io/blog/author/didesous/
The flat icons are supposed to be opt-in, via the theme flag
"FlatSideBarIcons=true". It is false by default for the default
theme for now.
Change-Id: I1cbe69d4e138d5d23c0172a374933ac7a4ce8a5b
Reviewed-by: Alessandro Portale <alessandro.portale@theqtcompany.com>
http://blog.qt.io/blog/author/didesous/ announced new designs/themes
for Qt Creator. This patch implements the helper functions for the
loading and theme-specific recoloring of icons.
Change-Id: Ie6e96eeecb70dccd6b95338c653a9d3b760557cc
Reviewed-by: Alessandro Portale <alessandro.portale@theqtcompany.com>
Qt 5.3 is the minimum requirement these days. Remove all fallback code
from sources and project files.
Change-Id: If6188a471197acadda4d6baee71804ba1a8026c6
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
Letting that helper function return a file name is more flexible than
returning a QPixmap.
Change-Id: I4634e4e795eec029608c8e65c1a0e8afff870a91
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
This patch makes the drawing and caching of the
QStyle::PE_IndicatorArrow* elements devicePixelRatio-aware. Also, the
triangle and shadow color are adjusted to be consistent with the other
toolbar icons.
The custom triangle drawig code (which was copied from a base style) has
been replaced by calls of QCommonStyle::drawPrimitive(). A filled
45-45-90 triangle is best rendered without antialiasing.
Change-Id: I9a4371ec4dc04bd4455050913219c50adfcb37b5
Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
There's no such function and the commit that introduced it did not
mention a pending or future commit either.
Change-Id: I6a814375ed1411db8d5810a5f616456fc3268c33
Reviewed-by: Nikita Baryshnikov <nib952051@gmail.com>
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
An image passed to drawCornerImage() can have any devicePixelRatio or
rather "its own imagePixel to userPixel ratio".
drawCornerImage() calls QPainter::drawImage and now passes it a source
rect in "image pixels" and a target rect in "user pixels".
Change-Id: Ia0d6459c1570ec5d4f87568e653526f738594f6e
Reviewed-by: Marco Bubke <marco.bubke@digia.com>
The QFileInfo::exists(const QString &) seems to be introduced in 5.2
Change-Id: I9289994bd0a38ba026656cb8cd6ed60b9df0c3fc
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
QIcon can load a @2x variant of an image in case it exists and
in case the devicePixelRatio is 2. In Qt Creator, we need the same
functionality for loading QPixmaps. This patch adds the helper
function.
Change-Id: I8e50d1dabb7c8dce1347c8e0a0ce611ec102f9d3
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This change updates the mode selector/fancyactionbar
in Qt Creator with new high-resolution icons.
Set Qt::AA_UseHighDpiImages on Qt 5.1 and higher to
make QIcon generate high-dpi pixmaps. Add "@2x" mode
images.
Update StyleHelper::drawIconWithShadow to handle high-dpi
pixmaps. The shadow-drawing algorithm is kept in device
pixels.
Change-Id: I411b7a24e534a2d75a1bbdc4d10219dcbea26bed
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
Forward-declare QGraphicsOpacityEffect in DetailsButton,
QProcessEnvironment in Environment, QFileInfo in fileutils,
QUrl in IWelcomePage, FancyLineEdit in PathChooser and
remove unneeded headers.
Change-Id: I7d5f273530dd2059bbdaf0899f0a3bc7e49e8482
Reviewed-by: hjk <hjk121@nokiamail.com>
The class' member functions are intended to be used
instead of the Q_OS_* macros in all contexts where
the latter are not syntactically required.
This lowers the likelihood of changes made on one
platform breaking the build on another, e.g. due to
the code model missing symbols in #ifdef'ed out code
when refactoring.
Change-Id: I4a54788591b4c8f8d589b8368a6c683d4155c9fa
Reviewed-by: hjk <qthjk@ovi.com>
Getting the #include directives ready for Qt5. This includes the
new-project wizards.
Change-Id: Ia9261f1e8faec06b9285b694d2b7e9a095978d2b
Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
We want to carry over all mac-specific code paths
to Qt 5. WS_MAC is no longer set; OS_MAC is.
This change is compatible with Qt 4 builds since
OS_MAC is set whenever WS_MAC is. (OS_MAC would
also be set for the theoretical X11/Mac platform,
but that's anyway not a supported configuration
for Creator)
Change-Id: Ib25d8c4e83e7e27d911124cd48aa17fdb875923f
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
When there was no existing configuration, it would get set to pure black
on startup, resulting in a very dark gray Qt Creator. Now it is back to
its old friendly gray as default color.
Also made sure that the default on startup and the color used for
resetting the UI color in the settings are always in sync.
Reviewed-by: Jens Bache-Wiig
There was a flicker problem with the tool bars because of
missing information in the cache key. We added this info
and removed the redundant caching of toolbar gradients.
Done-with: thorbjorn
The sidebar is a diffuse surface. Hence the reflection
does not really make sense there. Additionally, this
allows us to get more unified spacing and we can apply
the same shadow to system icons.