2009-04-17 11:26:03 +02:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								TEMPLATE = app
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								TARGET = phony_target
							 | 
						
					
						
							
								
									
										
										
										
											2013-05-14 19:04:03 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								CONFIG -= qt sdk separate_debug_info gdb_dwarf_index
							 | 
						
					
						
							
								
									
										
										
										
											2009-06-02 11:22:44 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								QT =
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								LIBS =
							 | 
						
					
						
							
								
									
										
										
										
											2010-07-16 10:29:46 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								macx:CONFIG -= app_bundle
							 | 
						
					
						
							
								
									
										
										
										
											2009-04-17 11:26:03 +02:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								isEmpty(vcproj) {
							 | 
						
					
						
							
								
									
										
										
										
											2009-06-02 11:22:44 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    QMAKE_LINK = @: IGNORE THIS LINE
							 | 
						
					
						
							
								
									
										
										
										
											2009-04-17 11:26:03 +02:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    OBJECTS_DIR =
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    win32:CONFIG -= embed_manifest_exe
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								} else {
							 | 
						
					
						
							
								
									
										
										
										
											2009-06-08 15:54:44 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    CONFIG += console
							 | 
						
					
						
							
								
									
										
										
										
											2009-04-17 11:26:03 +02:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    PHONY_DEPS = .
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    phony_src.input = PHONY_DEPS
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    phony_src.output = phony.c
							 | 
						
					
						
							
								
									
										
										
										
											2009-06-08 15:54:44 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    phony_src.variable_out = GENERATED_SOURCES
							 | 
						
					
						
							
								
									
										
										
										
											2009-04-17 11:26:03 +02:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    phony_src.commands = echo int main() { return 0; } > phony.c
							 | 
						
					
						
							
								
									
										
										
										
											2009-06-08 15:54:44 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    phony_src.name = CREATE phony.c
							 | 
						
					
						
							
								
									
										
										
										
											2009-04-17 11:26:03 +02:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    phony_src.CONFIG += combine
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    QMAKE_EXTRA_COMPILERS += phony_src
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2015-07-13 10:09:14 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								STATIC_BASE = $$PWD
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								# files/folders that are conditionally "deployed" to the build directory
							 | 
						
					
						
							
								
									
										
										
										
											2009-04-17 11:26:03 +02:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								DATA_DIRS = \
							 | 
						
					
						
							
								
									
										
										
										
											2010-11-11 16:49:17 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    welcomescreen \
							 | 
						
					
						
							
								
									
										
										
										
											2010-10-21 19:15:55 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    examplebrowser \
							 | 
						
					
						
							
								
									
										
										
										
											2010-12-03 15:55:51 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    snippets \
							 | 
						
					
						
							
								
									
										
										
										
											2009-04-17 11:26:03 +02:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    templates \
							 | 
						
					
						
							
								
									
										
											 
										 
										
											
												Implement theming for QtCreator
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>
											
										 
										
											2014-10-14 19:09:48 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    themes \
							 | 
						
					
						
							
								
									
										
										
										
											2009-04-17 11:26:03 +02:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    designer \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    schemes \
							 | 
						
					
						
							
								
									
										
										
										
											2009-07-13 14:35:40 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    styles \
							 | 
						
					
						
							
								
									
										
										
										
											2010-09-24 15:42:56 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    rss \
							 | 
						
					
						
							
								
									
										
										
										
											2013-09-25 18:22:01 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    debugger \
							 | 
						
					
						
							
								
									
										
										
										
											2010-03-01 13:01:05 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    qmldesigner \
							 | 
						
					
						
							
								
									
										
										
										
											2010-07-22 14:48:20 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    qmlicons \
							 | 
						
					
						
							
								
									
										
										
										
											2010-09-29 10:07:19 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    qml \
							 | 
						
					
						
							
								
									
										
										
										
											2010-09-17 13:46:26 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    qml-type-descriptions \
							 | 
						
					
						
							
								
									
										
										
										
											2015-08-31 18:06:36 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    modeleditor \
							 | 
						
					
						
							
								
									
										
										
										
											2010-11-26 14:03:05 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    generic-highlighter \
							 | 
						
					
						
							
								
									
										
										
										
											2013-12-10 14:37:32 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    glsl \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    cplusplus
							 | 
						
					
						
							
								
									
										
										
										
											2011-04-27 15:27:44 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								macx: DATA_DIRS += scripts
							 | 
						
					
						
							
								
									
										
										
										
											2009-04-17 11:26:03 +02:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2012-05-20 22:03:18 +03:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								for(data_dir, DATA_DIRS) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    files = $$files($$PWD/$$data_dir/*, true)
							 | 
						
					
						
							
								
									
										
										
										
											2013-06-27 13:59:25 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    # Info.plist.in are handled below
							 | 
						
					
						
							
								
									
										
										
										
											2015-07-13 10:09:14 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    for(file, files):!contains(file, ".*/Info\\.plist\\.in$"):!exists($$file/*): \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        STATIC_FILES += $$file
							 | 
						
					
						
							
								
									
										
										
										
											2012-05-20 22:03:18 +03:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2015-07-13 10:09:14 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								include(static.pri)
							 | 
						
					
						
							
								
									
										
										
										
											2009-04-17 11:26:03 +02:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2015-07-13 10:09:14 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								# stuff that cannot be handled by static.pri
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								osx {
							 | 
						
					
						
							
								
									
										
										
										
											2011-03-29 11:25:24 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								   # do version magic for app bundles
							 | 
						
					
						
							
								
									
										
										
										
											2011-03-28 15:31:27 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								   dumpinfo.input = qml/qmldump/Info.plist.in
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								   dumpinfo.output = $$IDE_DATA_PATH/qml/qmldump/Info.plist
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								   QMAKE_SUBSTITUTES += dumpinfo
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								}
							 | 
						
					
						
							
								
									
										
										
										
											2011-03-29 11:25:24 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								SRCRESOURCEDIR = $$IDE_SOURCE_TREE/src/share/qtcreator/
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								defineReplace(stripSrcResourceDir) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    win32 {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        !contains(1, ^.:.*):1 = $$OUT_PWD/$$1
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    } else {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        !contains(1, ^/.*):1 = $$OUT_PWD/$$1
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    }
							 | 
						
					
						
							
								
									
										
										
										
											2014-08-29 13:18:41 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    out = $$clean_path($$1)
							 | 
						
					
						
							
								
									
										
										
										
											2011-03-29 11:25:24 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    out ~= s|^$$re_escape($$SRCRESOURCEDIR)||$$i_flag
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    return($$out)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								# files that are to be unconditionally "deployed" to the build dir from src/share to share
							 | 
						
					
						
							
								
									
										
										
										
											2011-03-29 11:25:43 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								DATA_DIRS = \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    externaltools
							 | 
						
					
						
							
								
									
										
										
										
											2011-03-29 11:25:24 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								DATA_FILES_SRC = \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    externaltools/lrelease.xml \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    externaltools/lupdate.xml \
							 | 
						
					
						
							
								
									
										
										
										
											2011-07-29 14:58:26 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    externaltools/sort.xml \
							 | 
						
					
						
							
								
									
										
										
										
											2012-12-14 16:03:31 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    externaltools/qmlviewer.xml \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    externaltools/qmlscene.xml
							 | 
						
					
						
							
								
									
										
										
										
											2011-03-29 11:25:24 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								unix {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    macx:DATA_FILES_SRC += externaltools/vi_mac.xml
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    else:DATA_FILES_SRC += externaltools/vi.xml
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								} else {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    DATA_FILES_SRC += externaltools/notepad_win.xml
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								for(file, DATA_FILES_SRC):DATA_FILES += $${SRCRESOURCEDIR}$$file
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								unconditionalCopy2build.input = DATA_FILES
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								unconditionalCopy2build.output = $$IDE_DATA_PATH/${QMAKE_FUNC_FILE_IN_stripSrcResourceDir}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								isEmpty(vcproj):unconditionalCopy2build.variable_out = PRE_TARGETDEPS
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								win32:unconditionalCopy2build.commands = $$QMAKE_COPY \"${QMAKE_FILE_IN}\" \"${QMAKE_FILE_OUT}\"
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								unix:unconditionalCopy2build.commands = $$QMAKE_COPY ${QMAKE_FILE_IN} ${QMAKE_FILE_OUT}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								unconditionalCopy2build.name = COPY ${QMAKE_FILE_IN}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								unconditionalCopy2build.CONFIG += no_link
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								QMAKE_EXTRA_COMPILERS += unconditionalCopy2build
							 | 
						
					
						
							
								
									
										
										
										
											2011-03-29 11:25:43 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								!macx {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    for(data_dir, DATA_DIRS) {
							 | 
						
					
						
							
								
									
										
										
										
											2015-09-15 11:38:18 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        $${data_dir}.files = $$IDE_DATA_PATH/$$data_dir
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        $${data_dir}.path = $$INSTALL_DATA_PATH
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        $${data_dir}.CONFIG += no_check_exist
							 | 
						
					
						
							
								
									
										
										
										
											2011-03-29 11:25:43 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        INSTALLS += $$data_dir
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								}
							 |