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>
It apparently was a bad idea to let QImage load an empty string in case
of flat style. In order to fix that, we simplyfy the code by making the
images static locals in the scope for non-flat painting.
That has the additional advantage that they are only loaded once.
Change-Id: I8acb2ff09fe77cc708be2670cddaa41e23c9afa7
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Following Diana's flat style motto "remove unnecessary lines", this
patch makes highlights and shadows in the toolbars optional, and removes
them for the new flat theme.
"default" and "dark" are not affected by this change.
Change-Id: Iadbbaa669e318406a154fed3e07890fd40f5f621
Reviewed-by: Orgad Shaneh <orgads@gmail.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 fixes squeezed icons on some Linux Distros with QStyle
integrations, where a lower value would be set and the icons
be squeezed and become blurry.
Change-Id: I2962dd370491fc741646f52a9794e178a2ff81b1
Reviewed-by: hjk <hjk@theqtcompany.com>
The CE_Splitter drawControl code in ManhattanStyle wasn't used. This
patch removes it, changes MiniPliter::onPaint to use the theme color,
and adjusts dark.creatortheme's SplitterColor so that actually nothing
changes visually.
Change-Id: I0b94bd2125fd037c2c21dad195f31d092332db43
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Alessandro Portale <alessandro.portale@theqtcompany.com>
Use the same image file and recolor it as needed,
Change-Id: I914819a53ca05d83ca5b88adf44706b460b48ac0
Reviewed-by: Alessandro Portale <alessandro.portale@theqtcompany.com>
Instead of describing icons via file name or in the themed icons case
via
a string that is a list of mask/color pairs, we have now a class for it.
Icons are now listed in per-plugin *icons.h headers.
RunControl::m_icon was The only place left where an icon property was in
fact a string. This patch changes that member to be a Utils::Icon.
Change-Id: Ibcfa8bb25e6d2e330c567ee7ccc0b97ead603177
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
Fixing a few HighDPI off-by-1s in the tool bars, tool buttons and the
status bar mostly by changing using float based draw commands.
The border around the hovered application menu item
is gone.
Task-number: QTCREATORBUG-15222
Change-Id: I1dd34d1fa9b9b01fae772f7e7c27c589a83d4c7f
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
With the dark theme, it is very hard to distinguish between normal and pressed
toolbuttons.
Change-Id: Ic5baaa3f5a8651e19ebdfd8dad08904dc0ef0820
Reviewed-by: Alessandro Portale <alessandro.portale@theqtcompany.com>
If the style doesn't offer any icons that have at least 32 pixels
Change-Id: I840d73a0b4bdee695bb68df1c3973ee419db012e
Task-number: QTCREATORBUG-12832
Reviewed-by: Robert Loehning <robert.loehning@theqtcompany.com>
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
Sort of introduced by recent form layout fix for OS X.
Add the missing break statements.
Change-Id: I0862c34f31e4afc7d1834fa436c6193345205b9b
Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
That was used during the times where OS X still had alternating row
colors in item views.
Change-Id: I6622604502a768c4abeb42f25bcfea5c65f66395
Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
The default in QMacStyle, to use FieldsStayAtSizeHint, just almost
always is the wrong thing to do. Additionally this goes undetected for a
while most of the time, because most people do not run their code on OS
X. Override it globally to AllNonFixedFieldsGrow like in other shipped
styles.
Task-number: QTCREATORBUG-14337
Change-Id: I3b0719c0201871fbf0163b54b1a54823bf5d14f3
Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
In the dark theme (fusion style under linux), disabled
menu items looked bad due to (1) SH_EtchDisabledText being enabled
and (2) a bright color for the etch effect.
This patch adds color values for normal and disabled text colors
for menu items. It also adds a color value "style" which indicates
that the color should just stay at the default of the style.
The default theme uses this value for the new menu item colors,
while the dark theme fixes the ugly colors.
The patch also disables etching for disabled text.
Task-number: QTCREATORBUG-13447
Change-Id: Ib54504693d28cf2c71f3fc5a88d3de014230b12b
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
Reviewed-by: Thorben Kroeger <thorbenkroeger@gmail.com>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Used BackgroundColorSelected as a workaround in 3.3 in order to
maintain BC.
Change-Id: I1520deb8adcfed26b65aa7f4612218d15c310923
Reviewed-by: Thorben Kroeger <thorbenkroeger@gmail.com>
Reviewed-by: Alessandro Portale <alessandro.portale@theqtcompany.com>
Mostly done using the following ruby script:
Dir.glob('**/*.cpp').each { |file|
next if file =~ %r{src/shared/qbs|/qmljs/}
s = File.read(file)
s.scan(/^using namespace (.*);$/) {
ns = $1
t = s.gsub(/^(.*)\b#{ns}::((?!Const)[A-Z])/) { |m|
before = $1
char = $2
if before =~ /"|\/\/|\\|using|SIGNAL|SLOT|Q_/
m
else
before + char
end
}
if t != s
puts file
File.open(file, 'w').write(t)
end
}
}
Change-Id: I5c6690f51488bf8ca3610ba9fb11e6e5fd814aaa
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
Reviewed-by: hjk <hjk@theqtcompany.com>
This is a workaround for 3.3. In master the splitter color (among some
other widgets) should have its own value.
Task-number: QTCREATORBUG-13768
Change-Id: I8456fba3866e4857985e07a4708333952512484d
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
It is used when e.g. searching the environment widget.
Change-Id: I203b9f5e280a8f18f7a38f8e4d7b4540c79f932c
Reviewed-by: Thorben Kroeger <thorbenkroeger@gmail.com>
Reviewed-by: hjk <hjk121@nokiamail.com>
!option->state & State_Enabled is accidentially satisfied because
State_Enabled is 1, so the condition is true for any non-zero value of
option->state.
Change-Id: I965012ceecbad7296fae4eff7d429dcb8391aa2c
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
The opacity is set to 0.8 if disabled (Not if enabled).
Change-Id: I7016a083f71c700de68444a62e97d5dee4b733e7
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
A theme is supposed to provide colors, flags and images. This change
removes functions from Theme which do not just return simple data.
Also ManhattanStyle and Theme get separated a bit.
Change-Id: I2fab26ee38b858fefb55920eb219f84abcfaac18
Reviewed-by: hjk <hjk121@nokiamail.com>
Adds a 'Theme' tab to the environment settings and a '-theme' command
line option.
A theme is a combination of colors, gradients, flags and style
information.
There are two themes:
- 'default': preserves the current default look
- 'dark': uses a more flat for many widgets, dark color theme
for everything
This does not use a stylesheet (too limited), but rather sets
the palette via C++ and modifies drawing behavior.
Overall, the look is more flat (removed some gradients and bevels).
Tested on Ubuntu 14.04 using Qt 5.4 and running on a KDE
Desktop (Oxygen base style).
For a screenshot, see
https://gist.github.com/thorbenk/5ab06bea726de0aa7473
Changes:
- Introduce class Theme, defining the interface how to access theme
specific settings. The class reads a .creatortheme file (INI file, via
QSettings)
- Define named colors in the [Palette] section
(see dark.creatortheme for example usage)
- Use either named colors of AARRGGBB (hex) in the [Colors]
section
- A file ending with .creatortheme may be supplied
to the '-theme' command line option
- A global Theme instance can be accessed via creatorTheme()
- Query colors, gradients, icons and flags from the theme
were possible (TODO: use this in more places...)
- There are very many color roles. It seems better to me
to describe the role clearly, and then to consolidate later
in the actual theme by assigning the same color.
For example, one can set the text color of the output pane button
individualy.
- Many elements are also drawn differently.
For the dark theme, I wanted to have a flatter look.
- Introduce Theme::WidgetStyle enum, for now {Original, Flat}.
- The theme specifies which kind of widget style it wants.
- The drawing code queries the theme's style flag and
switches between the original, gradient based look and
the new, flat look.
- Create some custom icons which look better on dark background
(wip, currently folder/file icons)
- Let ManhattanStyle draw some elements for non-panelwidgets, too
(open/close arrows in QTreeView, custom folder/file icons)
- For the welcomescreen, pass the WelcomeTheme class.
WelcomeTheme exposes theme colors as Q_PROPERTY accessible from
.qml
- Themes can be modified via the 'Themes' tab in the environment
settings.
TODO:
* Unify image handling
* Avoid style name references
* Fix gradients
Change-Id: I92c2050ab0fb327649ea1eff4adec973d2073944
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
Reviewed-by: hjk <hjk121@nokiamail.com>