If modes provide a QMenu, a little arrow is shown next to the mode icon.
If the user clicks there, the menu is shown instead of changing the
mode.
Limitations: Modes need to provide some QMenu instance already when they
are added to the object pool. Setting or removing the menu later will
not update the UI.
Change-Id: Ic4ef709e6200afcff14f41054a5dd98c37b0b849
Reviewed-by: hjk <hjk@theqtcompany.com>
Some Themes do not want highlights and shadows in the toolbars. But we
definitely want a separator between FancyColorButton and FancyTabBar.
Change-Id: I24f384514146d664dbb41ef073368a11c79d85b8
Reviewed-by: Eike Ziller <eike.ziller@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>
It doesn't really make sense to have that handling deep in the
FancyTabWidget.
Change-Id: If4b4b9b9c3cbc49c25091982b398fb18f9bf87c2
Reviewed-by: Alessandro Portale <alessandro.portale@theqtcompany.com>
And adapting darkframe.creatortheme accordingly to match Diana's
specification
Change-Id: I9e1f62869ff91d7cfd3a26f51d26225d549a0965
Reviewed-by: Alessandro Portale <alessandro.portale@theqtcompany.com>
Reduce the usage of half-transparent colors to just the Fancy* widgets.
Otherwise, we have side effects like QTCREATORBUG-15770 in other
widgets (e.g. search results pane).
Change-Id: I0e2b0155441c4f1a071bd3c1029577accb73d56b
Reviewed-by: Tobias Hunger <tobias.hunger@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>
ColorTip:
Draw the border around the color tooltip properly.
MiniProjectTargetSelector:
Fixing a few misplaced outlines
FancyActionBar:
Fixing a few misplaced outlines, also:
- deduplicate hover gradient painting code
- use pixmapcache for the hover gradient
- only draw the hover gradient if the tab is hovered
- use 0-255 as range for fading value
QtQuick Designer:
HighDPI form editor icons, and removing some since a
while unused icons.
ProjectExplorer Mode:
HighDPI graphics and fixing a few misplaced outlines
Task-number: QTCREATORBUG-15222
Change-Id: I4fcf515014317791499ad89bf6ef88d961e4b752
Reviewed-by: Alessandro Portale <alessandro.portale@theqtcompany.com>
Fixing the painting of selected tabs and using QPixmapCache,
to reduce slow gradinet painting.
Fixing the outlines around the background gradient
Task-number: QTCREATORBUG-15222
Change-Id: I5973da1457a94be45610a21b643eddaa5380e1e0
Reviewed-by: Eike Ziller <eike.ziller@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>
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>
setPalette() does not replace the old one but rather adds the
difference. Thus a previous copy of the palette is unnecessary.
Change-Id: I5c06da456b76144efc4a984ccda13c7d2243a7bc
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
Qt 5 will not expose QWindowsStyle, use QStyleFactory instead.
Change-Id: Id4ec0a4812cd8f8378ad1e493796c6110080c0ae
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
Qt 5 will not expose QWindowsStyle, use QStyleFactory instead.
Change-Id: Id4ec0a4812cd8f8378ad1e493796c6110080c0ae
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
When resizing the Qt Creator main window to a smaller size, at some
point the mode tab icons will shrink to fit all tabs into the window.
The icon size will if necessary shrink to tiny sizes below 8px,
which is pointless.
Let's add some code that hides the icons when a tab becomes smaller
than a certain size.
Task-Number: QTCREATORBUG-7879
Change-Id: I590379a2ec52a8a86e998c08b29d54aca800e542
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@nokia.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>
Previously setBaseColor used to refuse setting an invalid color. It
doesn't do this anymore, so let's just check for this case here.
Change-Id: Ie8a292ca809ac3838c8a52b91a9186dc5dbb992c
Reviewed-on: http://codereview.qt.nokia.com/28
Reviewed-by: Daniel Molkentin <daniel.molkentin@nokia.com>
Multi-line text is not currently supported with text eliding
and the current beahvior is that it breaks in reverse mode.
I will simply remove the eliding flag for now.
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.
After fixing the sidebar to use delayed update,
code that relied on setCurrentItem could break
since the state was not set asyncronously.
This fixes it by only making mouseClick delayed,
while setCurrentIndex works as before when set
programatically.
Reviewed-by: Lasse Holmstedt
We previously allowed fully white and yellow colors as the
base color for our interface. This does not work with our
icons or other interface elements. Instead I now constrain
the selectable colors within a certain range of saturation
and brightness. This still leaves the user in control but
will prevent the common case where the user selects an
overly saturated color from the color picker and ends up
with an unusable or extremely ugly panel.