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>
Qt draws lines on half-pixel boundaries. Because of
rounding, this is not visible with non-scaled aliased
painting. However, on a high-DPI screen with scaling
enabled, the line under the menu bar is drawn at a one
pixel offset, which causes it to overlap the menubar items.
This change draws the line at the mathematically correct position.
Task-number: QTBUG-38858
Change-Id: I0a2260507d346b52a36258d479cde87064d991ef
Reviewed-by: Alessandro Portale <alessandro.portale@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>
New @2x variants for inputfield.png and inputfield_disabled.png. Loading
them with Utils::StyleHelper::dpiSpecificPixmap(). Small adjustments for
resolution independent drawing of the focus/hover rect.
Change-Id: I6e1322e597c1fca7fc4ff7cce8801e99ce03e57a
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
By adding a title, and a left border.
Change-Id: Id8a577c9011c7a7282f5b540e94e8f809481b6fa
Task-number: QTCREATORBUG-9104
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
The only view that is sane is my view. Adds handling of return/enter
for macintosh. Allows for overriding whether single or double click
activates items via setActivationMode.
Change-Id: Id8f9001f99162833c682dfc5b2b1abac04ce18a3
Reviewed-by: Eike Ziller <eike.ziller@digia.com>