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>
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>
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>
A widget specifically layouted for the status bar can now be registered
with the progress information. The newest one is made visible next to
the summary progress bar. If a newer one vanishes, the older becomes
visible again.
Change-Id: Iedf0e88a542ea442ae86fa51c792c68fbc6eef3c
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
This both allows the mode bar to be hidden optionally, and can give the
progress information a bit more room (e.g. for titles).
Progress information can either be shown in "pop up" windows in the
lower left corner of the main window (hiding window contents below),
or in a summary progress bar in the bottom right corner of the status bar.
Hovering the summary progress bar temporarily pops up the detailed
progress information. Keyboard can be used to switch between the two
views.
Change-Id: Ic6d6ab4fd43906e84b480c8ddf8eae5f5852e1f3
Reviewed-by: Erik Verbruggen <erik.verbruggen@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 allows clients to get notified that the operation has been canceled
by the user without the need to create an additional QFutureWatcher
themselves.
Change-Id: I928f87eef98ce762d77dcc6962c082fe49f38f6e
Reviewed-by: Eike Ziller <eike.ziller@nokia.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>
They'll fade "after user interaction" now (since canceling will most
probably lead to mouse movement over the widget that already counts as
interaction, i.e. after pressing 'x' it will fade after a while).
Task-number: QTCREATORBUG-4456
Change-Id: Id095a6bbd5819b93ec8cb9f514b429ef5ab231e9
Reviewed-on: http://codereview.qt.nokia.com/712
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
Fix "QPropertyAnimation::updateState (%s): Changing state
of an animation without target" warning.
This apparently happens when the animation is still running, but
the FutureProgress widget has already been killed. Avoid this
by setting the widget as the parent of the animation.
- the Nokia Qt SDK UpdateInfo plugin progress should stay in the
progress view till the user clicks on it
- now the futureprogress knows the difference between:
KeepOnFinishTillUserInteraction and KeepOnFinish
Reviewed-by: con
Some concurrent jobs, like getting 'git blame' output, do not report
progress. Their the minimum and maximum of their progress range is
always 0, but they do report when they are finished. When such a job
finishes, we should make sure the progress bar indicates this.
Reviewed-by: con
The patch makes notification items fade away after 5 seconds.
KeepOnFinish items like the build notification are kept for
5 seconds after the user interacts with mouse or keyboard.
Done-width: jbache