Commit Graph

2984 Commits

Author SHA1 Message Date
Christian Stenger
05c5ed2859 Core: Reset current OutputPanePlaceHolder on deletion...
...to avoid nullptr access

Task-number: QTCREATORBUG-15987
Change-Id: I98da9323d13027192b77d0ba7ac8b846849930f0
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2016-04-05 08:48:52 +00:00
Alessandro Portale
57d01156ed ProgressBar: Conditional highlight and HighDPI fix
This change makes drawing of the highlight above each progress bar
depend on the current Theme::DrawToolBarHighlights flag.

Also some off-by-ones issues in HighDPI are fixed.

Change-Id: I80bb21d001784a8622fff795f3751d7b1697ddf1
Reviewed-by: Alessandro Portale <alessandro.portale@theqtcompany.com>
2016-04-03 19:55:53 +00:00
Alessandro Portale
3e1c7f6fd5 Flat themes: remove the shadow from pressed manhattan toolbuttons
That's flatter and more consistent with the flat pressed buttons in the
mode bar and status bar.

Change-Id: I29edd2b184b8468005bffe8fe8c9f2e275355df1
Reviewed-by: Alessandro Portale <alessandro.portale@theqtcompany.com>
2016-04-02 18:25:15 +00:00
Alessandro Portale
14af79932a Core: Dedicated lock/unlock icons for toolbar and documents view
This change enables us to have a variation of the lock icon for toolbars
and for non-toolbars. This gives removes the need for an outlined locked
icon which would work on dark and light backgrounds.

Change-Id: I5b825b11e892928515112f6f49b1b0639862bc42
Reviewed-by: Alessandro Portale <alessandro.portale@theqtcompany.com>
2016-04-01 23:47:34 +00:00
Alessandro Portale
051ac9dd0e Core: New and themable locked/unlocked icon
This change replaces the existing locked/unlocked icons with Diana's
icons and makes them themable. Now, they fit much better into the UI.
Especially in the dark theme.

Change-Id: I51beb3be202af8f2f467e81701cd5f27a6837d1c
Reviewed-by: Alessandro Portale <alessandro.portale@theqtcompany.com>
2016-04-01 18:27:42 +00:00
Alessandro Portale
ea1f5d2b6c Icons: Move debug run/interrupt/continue/exit from core to elsewhere
Core contains the small variants of debug run/interrupt/continue/exit
while the bigger icon variants are in projectexplorer or debugger. That
does not seem to have aany reason, at least in today's state of Qt
Creator architecture.

But above all, it stands in the way when changing debugger icons as
planned due to user feedback.

This change moves:

   Core::Icons::DEBUG_START_SMALL
to ProjectExplorer::Icons::DEBUG_START_SMALL

   Core::Icons::DEBUG_EXIT_SMALL
to Debugger::Icons::DEBUG_EXIT_SMALL

   Core::Icons::DEBUG_INTERRUPT_SMALL
to Debugger::Icons::DEBUG_INTERRUPT_SMALL

   Core::Icons::DEBUG_CONTINUE_SMALL
to Debugger::Icons::DEBUG_CONTINUE_SMALL

This change just moves icons across modules but does not change anything
in the UI.

Change-Id: I859b901c312d4d16b6c2f687395a7b48c90aab84
Reviewed-by: Alessandro Portale <alessandro.portale@theqtcompany.com>
2016-04-01 14:26:03 +00:00
Alessandro Portale
2710168446 ManhattanStyle: Themable arrows
This change makes arrows in e.g. ComboBoxes themable. This also improves
the clear distinction between enabled and disabled state.

Change-Id: If40dcd3e162ad71d1bc6507c047203aa60e09ee6
Reviewed-by: Alessandro Portale <alessandro.portale@theqtcompany.com>
2016-03-31 10:40:32 +00:00
Oswald Buddenhagen
f9a182a285 Merge remote-tracking branch 'origin/3.6' into 4.0 2016-03-30 10:56:25 +02:00
Ulf Hermann
af0b93196b VariableChooser: Create widgets before assigning models
With Qt 5.7 the currentChanged() callback is called immediately on
QTreeView::setModel(), which leads to the label text being set. That
crashes if the label hasn't been created, yet.

Change-Id: I73763e1ac1c86215090a8f4b0118bc0cd286cf47
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2016-03-30 08:40:49 +00:00
Alessandro Portale
063c8d45c8 Theming: Fix menu item highlight for the themed (flat) menu bar
Since StyleHelper::baseColor now returns a themed color and
QColor::lighter() lightens up dark colors relatively little, we should
to use a themed color for the background instead.

Task-number: QTCREATORBUG-15930
Change-Id: I256ddcf946a14af6937c324a76e3f3a24919ae3b
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2016-03-30 07:19:12 +00:00
Giuseppe D'Angelo
fb137ade7d Fix crash in VariableChooser
fce83bd9f84883f93829e6ca9eacf098b018a02d in qtbase causes a crash:
setModel creates a new selection model, which calls currentChanged,
which accesses an uninitialized member. Hence, protect the access to it.

Change-Id: I144f40aa4286f1a9edba24519a30c08ff5091f57
Reviewed-by: hjk <hjk@theqtcompany.com>
2016-03-24 16:05:26 +00:00
Eike Ziller
62cbe69cd2 Clearer separation of flat output pane buttons
Change-Id: Id3072715592d8333cb488561ba1e0d1828de6acf
Reviewed-by: Alessandro Portale <alessandro.portale@theqtcompany.com>
2016-03-23 09:12:35 +00:00
Alessandro Portale
22a262e8f6 ProjectExplorer: Flat desktop device icon for flat themes
This change flattens the desktop device icon in the mode bar. Only for
themes which set the FlatSideBarIcons flag.

":///DESKTOP///" deduplicates to Constants::DESKTOP_DEVICE_ICON

Change-Id: Ie31d9c501db2a1e36edbfac59abdd22a4d8c6773
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2016-03-23 08:57:59 +00:00
Eike Ziller
ed8b492728 Fix tool tips of output pane buttons
Were not shown anymore. Regression already in 3.6.

Change-Id: Id92a7655423add70864a123e16e4a3d344289612
Reviewed-by: Alessandro Portale <alessandro.portale@theqtcompany.com>
2016-03-23 07:45:34 +00:00
Alessandro Portale
ddde4bdd27 Utils: Improved handling of StyleHelper::baseColor
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>
2016-03-21 14:23:23 +00:00
Eike Ziller
a029aafdf0 Move handling of color dialog that is opened from mode selector
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>
2016-03-18 12:59:36 +00:00
Alessandro Portale
3e040d4c3d Core: Use a constant for the default creator theme
Change-Id: I53ba63cf55fb6918d959b0d396175a3188d62bd9
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2016-03-18 11:18:17 +00:00
Alessandro Portale
22a0bdcdbe ProgressBar: Always show a minimal progress
... In order to avoid an empty progress bar background which can be
confusing especially with flat themes.

Change-Id: I062267f7a3f2627e0d043821a2dbd7462b6ce11f
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2016-03-17 12:06:57 +00:00
Alessandro Portale
bc481dc399 Flat theme: Same disabled color all side/tool/status bar icons
And adapting darkframe.creatortheme accordingly to match Diana's
specification

Change-Id: I9e1f62869ff91d7cfd3a26f51d26225d549a0965
Reviewed-by: Alessandro Portale <alessandro.portale@theqtcompany.com>
2016-03-17 11:54:14 +00:00
Alessandro Portale
5ab8440e2f ProgressBar: Add a theme color for the background
The progress bar is important and custom enough to deserve its own theme
color for the background. This change adds "ProgressBarBackgroundColor"
and also sets it for dark.cretatortheme, so that it has a good contrast
to ProgressBarColorNormal.

Change-Id: I37731d7a918a862a28940e215c913f9ade8569ca
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2016-03-17 08:05:08 +00:00
Orgad Shaneh
a5a4f02ced Core: Make IDocument concrete
Change-Id: I8290943614ea4a2060cf09a71fb4f957852ab705
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2016-03-17 07:43:55 +00:00
Alessandro Portale
49525a11f4 Flat themes: enable recoloring of the status bar & progress
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>
2016-03-16 14:49:13 +00:00
Alessandro Portale
b07e5eaf65 ProgressBar: Make it really flat for flat themes
Change-Id: I3964492e4b07dcba594d5bebc1b74d9458578e88
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2016-03-16 11:29:23 +00:00
Alessandro Portale
04a68518c9 Themes: Make theming of the menu bar optional
Inspired by numerous user feedback, I want to turn off the theming of
the menu bar for the new flat theme, and make it look like in the
default theme. At the same time, I want to leave the "dark" theme as it
currently is.

This patch adds a theme flag FlatMenuBar and turns it off for the new
theme.

Change-Id: I9bba056a27fab7a634b45324e3fe8cd26f50df74
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2016-03-14 11:00:44 +00:00
Orgad Shaneh
12574a4c74 Core: Fix memory leak
Detected by memcheck

Change-Id: Ic6e1ae6735ebea252858682e1a269f86166a9aa4
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2016-03-14 09:46:47 +00:00
Orgad Shaneh
b427ac706b Core: Initialize all members in FindToolbar
Use C++11 member initialization.

Change-Id: Ib4db2fc9354658a0a4969c18f2857678cb49bdae
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2016-03-14 09:43:27 +00:00
Alessandro Portale
b01879dea8 ManhattanStyle: Fix "QFSFileEngine::open: No file name specified"
It apparently was a bad idea to let QImage load an empty string in case
of flat style. In order to fix that, we simplyfy the code by making the
images static locals in the scope for non-flat painting.

That has the additional advantage that they are only loaded once.

Change-Id: I8acb2ff09fe77cc708be2670cddaa41e23c9afa7
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2016-03-13 13:03:28 +00:00
Alessandro Portale
a0fbfd3bd4 Themes: Make toolbar highlights optional
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>
2016-03-12 22:38:41 +00:00
Eike Ziller
9f15f70723 SettingsDialog: Modernize
Change-Id: Ia49293754b971c568eb48a577465266a2883a42f
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2016-03-11 10:44:27 +00:00
Eike Ziller
343242a988 SettingsDialog: Do not create widgets when looking for page with ID
For pages that are not delayed additionally by an OptionsPageProvider,
we can just look for the ID without creating any widgets.

Task-number: QTCREATORBUG-15848
Change-Id: I118aa4713e76c8a43df7abad9f846e68105c659e
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2016-03-11 10:44:16 +00:00
Eike Ziller
21c25bd1ae Fix disambiguated display name on case insensitive file systems
blah/Foo/bar.cpp and blubb/foo/bar.cpp should not be shown as
Foo/bar.cpp and foo/bar.cpp

Change-Id: I900606c63996eea4c11d09ff13579b6cc031a8c6
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2016-03-09 13:00:01 +00:00
Alessandro Portale
6ea9201f7b LocatorWidget: Fix hover effect
..by setting Qt::WA_Hover

Change-Id: If4b6e8d443a70e18796dd78b261495f2400db0f4
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
Reviewed-by: Alessandro Portale <alessandro.portale@theqtcompany.com>
2016-03-09 12:40:59 +00:00
Eike Ziller
9aee611520 OutputPanes: Fix various issues with restoring state
- maximize tool button was synced between modes,
  but the size didn't match that
- size was restored to the last visible size, even if that was
  maximized, but maximize state didn't match that

Manage the state (maximize state & non-maximized size) in the output
pane placeholders themselves. The output pane manager is only
responsible for the non maximized size setting that is restored at
restart.

Task-number: QTCREATORBUG-10992
Change-Id: I35b946bbffeef9fbf5301e34018dd0867bd902a6
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2016-03-09 11:18:59 +00:00
Eike Ziller
80191645a7 EditorManager: Open files with correct case
On case-insensitive file systems we still want files to open with the
correct case, because otherwise Qt Creator will later save it with a
different case.

Task-number: QTCREATORBUG-6510
Change-Id: I8e3f011939306d53c92e28fbf6eded1a2d42a9f2
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2016-03-08 11:55:05 +00:00
Eike Ziller
41e490f503 OutputPanePlaceHolder: Fix for lazily created mode widgets
When switching to a mode that creates an output pane placeholder lazily,
the currentModeChanged signal comes too late to make this placeholder
current.

Task-number: QTCREATORBUG-10447
Change-Id: Icb996e4f51ef5eadff8874ef0c3154b133d98aba
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2016-03-08 11:50:36 +00:00
Alessandro Portale
b427d5d516 FindWidget: Improve margins
Make the top and bottom margins for single-row (search-only) mode equal.
And add a space for the double-row (search/replace) mode.

Looks better with default and flat themes.

Change-Id: I795766834b1a40125bd90e5f3c6486cb8518d37f
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2016-03-04 15:52:59 +00:00
Eike Ziller
c165f2f0cc Fix vanishing output pane manage button
Looks like QApplication::globalStrut() can be 0,
but we want the button to expand anyhow.

Change-Id: Ia0f5c6c97bf352d16edd010efee7fda944b7a5ad
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2016-03-04 12:11:45 +00:00
Eike Ziller
16c7a262cc DocumentManager: Fix issues with handling of externally modified files
Use ApplicationState and ApplicationStateChange event instead of
deprecated ApplicationActivate event and unreliable
QApplication::activeWindow(). That fixes an issue where the file change
dialog was not shown after closing a modal dialog on Linux, because
there the activeWindow is temporarily set to 0 for some reason.

Also avoid excessive timer. Modifying a file that is open in Qt Creator
should not result in the system waking up 5 times a second afterwards.

Task-number: QTCREATORBUG-15687
Change-Id: I105d08cd590cc3c8ee5d8efdc568ad5fd2be0857
Reviewed-by: Robert Loehning <robert.loehning@theqtcompany.com>
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
2016-03-04 10:49:15 +00:00
Alessandro Portale
b0c8a68aba Flat Theme: Final touches for tool bar separators
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>
2016-03-03 12:19:53 +00:00
Alessandro Portale
0f8e3f2000 Flat themes: Implement Diana's separators
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>
2016-03-02 17:32:42 +00:00
Eike Ziller
8da98c44f1 Merge remote-tracking branch 'origin/master' into 4.0
Change-Id: Iab01658c329f3bf57077595d54be6ed73f11f715
2016-03-02 09:18:06 +01:00
Alessandro Portale
b590642a85 FancyLineEdit: Implement flat style
Follow Diana's guide for flat themes:

http://blog.qt.io/blog/2015/02/09/qt-creator-flat-style-ui-design-new-
light-theme/

Change-Id: Ia15f266dbf9138e9cac61e04265970543b2505bf
Reviewed-by: Alessandro Portale <alessandro.portale@theqtcompany.com>
2016-03-01 14:42:19 +00:00
Orgad Shaneh
925492a1b3 QmakePM: Avoid multiple loads of the same standard icon
Loading a standard icon is expensive.

Change-Id: Ic6bae20c9d0bdcb07fda48309bebcc3a959bc031
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2016-03-01 10:06:50 +00:00
Alessandro Portale
d36716ae14 Themes: Fix UI recoloring for flat themes
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>
2016-02-26 11:54:13 +00:00
Eike Ziller
47c3755600 mapReduce: Support progress information and add (unordered) map
If a container is given to mapReduce, it takes the responsibility to
report progress information for the whole operation. If the map function
reports its own progress, that is taken into account for the overall
progress.

The (so far only unordered) Utils::map operation can be used to replace
MultiTask, by passing a member function of the items in the container as
a map function.

Change-Id: I18ca38a6ad2899d73f590bfe59bf2e6eb2f1a57a
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2016-02-26 08:36:08 +00:00
Eike Ziller
5750b735b9 EditorManager: Rename "restored" to "suspended" documents
For documents that were "restored" from a session, without actually
opening them.
The new naming differentiates them from documents that were "restored"
from auto-save files, and also fits better if we later "suspend"
documents that have not been visible for a while.

Change-Id: I7727344299eb2b395fc94cd1ab401ceb489111aa
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
2016-02-25 13:22:40 +00:00
Orgad Shaneh
c1ccd40af9 Core: Make ProgressTimer more fluent
Change-Id: I3d8995096150a4756ab6ebc2ac33dac695886ffc
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2016-02-19 10:21:53 +00:00
Alessandro Portale
9c0faff713 Less "round" error icon
An octagon that occupies 12x12 pixels unfortunately looks like a circle.
This patch tweaks the diagonal to fix that a bit.

Also the hollow triangle gets a small tweak.

Change-Id: I8d69d94e96e7481c5a057926b6e7f933436f8e56
Reviewed-by: Alessandro Portale <alessandro.portale@theqtcompany.com>
2016-02-18 16:46:57 +00:00
Alessandro Portale
02af5d80b6 Themes: Enable UI recoloring for flat themes
Change-Id: I1907c42a769124b7505bd7afaf6c4da910f3f407
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2016-02-18 11:37:28 +00:00
Orgad Shaneh
caf2ca0a37 VCS: Chop trailing slash for cache
When the directory is root (on both Windows and Linux), it ends with a slash,
and yet it is valid (although unlikely to be managed by VCS).

Chop the slash to avoid soft assertions.

Change-Id: I0f206b5a7ee70e9c641ff872fa21662f9d92aab2
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2016-02-16 09:42:31 +00:00