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>
Replace compile-time checks for host OS by run-time checks.
Change-Id: I9f237389171586786c2609f81314bcb1bc17b01e
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
#!/usr/bin/env ruby
Dir.glob('**/*.cpp') { |file|
# skip ast (excluding paste, astpath, and canv'ast'imer)
next if file =~ /ast[^eip]|keywords\.|qualifiers|preprocessor|names.cpp/i
s = File.read(file)
next if s.include?('qlalr')
orig = s.dup
s.gsub!(/\n *if [^\n]*{\n[^\n]*\n\s+}(\s+else if [^\n]* {\n[^\n]*\n\s+})*(\s+else {\n[^\n]*\n\s+})?\n/m) { |m|
res = $&
if res =~ /^\s*(\/\/|[A-Z_]{3,})/ # C++ comment or macro (Q_UNUSED, SDEBUG), do not touch braces
res
else
res.gsub!('} else', 'else')
res.gsub!(/\n +} *\n/m, "\n")
res.gsub(/ *{$/, '')
end
}
s.gsub!(/ *$/, '')
File.open(file, 'wb').write(s) if s != orig
}
Change-Id: I3b30ee60df0986f66c02132c65fc38a3fbb6bbdc
Reviewed-by: hjk <qthjk@ovi.com>
This reverts commit 7b8cd42729.
This basically makes creator looks uglier on most platforms
while not really fixing anything on Ubuntu. The menubar is
on ubuntu (and mac) not shown in natively compiled versions
so it effectively fixes nothing, but makes the appearance
inconsistent on other platforms.
Change-Id: I4576b4dcc722dca59a7480eba41ce8efa970533b
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
This causes strange look e.g. with Ambiance theme on linux.
Change-Id: I9f56ca0c43d474a1db6f79c78e7d3653ea44ca46
Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
Also removed all <QMainWindow> includes which are not needed
anymore.
Change-Id: I393c9a62a5c6df95d9f35d872e1473a4f13bcdc4
Reviewed-by: hjk <qthjk@ovi.com>