Commit Graph

36 Commits

Author SHA1 Message Date
Henning Gruendl
316e48fc50 QmlDesigner: Remove version number from imports
Task-number: QDS-11177
Change-Id: I94a537af1d55d503aa04dd79c6194ef1a0647e83
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2024-01-17 08:01:32 +00:00
Henning Gruendl
3ad3a5f197 QmlDesigner: Remove unnecessary imports
Remove QtQuickDesignerTheme import if not needed.

Task-number: QDS-11177
Change-Id: Ia72001855bb636bfc2ddf11cbb00359fbe123c90
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2024-01-17 08:01:09 +00:00
Tim Jenßen
feabda3aa7 Merge remote-tracking branch 'origin/10.0' into qds/dev
bigger conflicts resolved at:
  src/plugins/qmldesigner/CMakeLists.txt
  src/plugins/qmlprojectmanager/qmlprojectrunconfiguration.cpp

Change-Id: I08e2a109d8e37cbd77225129854e9e633725bfc7
2023-03-26 16:26:18 +02:00
Thomas Hartmann
91e7efa5e0 QmlDesigner: Use StudioQuickWidget in item library
The event filter has to be installed on the actual QQuickWidget.
Using registerPropertyMap instead of global context properties.

Task-number: QDS-9124
Change-Id: I03c71dce228a7b8713bd1a5085541ed06c7ee0bd
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2023-03-07 10:09:14 +00:00
Kai Köhne
4e9c1d126c Replace GPL-3.0 with GPL-3.0-only
GPL-3.0 is deprecated by SPDX.

Change done by

 find . -type f -exec perl -pi -e 's/LicenseRef-Qt-Commercial OR GPL-3.0(?!-)/LicenseRef-Qt-Commercial OR GPL-3.0-only/g' {} \;

Change-Id: If316a498e3f27d2030b86d4e7743b3237ce09939
Reviewed-by: Lucie Gerard <lucie.gerard@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-01-10 08:05:04 +00:00
Thomas Hartmann
ee10ba1909 QmlDesigner: Add support for tooltip in item library
This allows to define tool tips in the .metainfo files.

Change-Id: I3236c6e9f374a052e99b18d8c3983bfd0f072162
Reviewed-by: Henning Gründl <henning.gruendl@qt.io>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2022-11-28 10:35:25 +00:00
Lucie Gérard
a7956df3ca Use SPDX license identifiers
Replace the current license disclaimer in files by
a SPDX-License-Identifier.

Task-number: QTBUG-67283
Change-Id: I708fd1f9f2b73d60f57cc3568646929117825813
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-08-26 12:27:18 +00:00
Miikka Heikkinen
e661135d13 QmlDesigner: Remove QML Image level caching of items that can change
Icons generated for components can change if the component is edited,
so don't cache them locally at Image level.

Also increased the compression timeout for component library updates as
200ms can sometimes be too short during project load.

Fixes: QDS-7068
Change-Id: I98a0920c4237a1147e9fb5da834e1dc235ae28f5
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-06-30 12:04:57 +00:00
Miikka Heikkinen
9a9cd6d62f QmlDesigner: Prevent showing preview tooltip when button is pressed
On some platforms, drag will stop deliving mouse events to MouseArea.
Disallowed showing the tooltip when a mouse button is pressed.

Fixes: QDS-6481
Change-Id: I8777d57be1bfef8470571027d9257d3a10eb5a7a
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Samuel Ghinet <samuel.ghinet@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-03-24 05:59:34 +00:00
Miikka Heikkinen
6173b78860 QmlDesigner: Allow going into component from item library
Added "Go into Component" to item library context menu for items that
have customComponentSource available. Doubleclicking on the item also
does the same.

Fixes: QDS-5786
Change-Id: I954bfb4864d74fa04b5da5b961f9aa2035132022
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Samuel Ghinet <samuel.ghinet@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-02-15 14:43:47 +00:00
Mahmoud Badri
3f83fb91d6 QmlDesigner: Animate item library controls' hovering
Added animation behavior for hovering. Also added top padding to the
search field so that the text is correctly aligned vertically.

Change-Id: I51273373aa43ceb3a3faca6a9f76b613fdd0be69
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-12-03 14:31:43 +00:00
Miina Puuronen
d0a4fc4b2c QmlDesigner: Implement a horizontal layout for Component Library
The view from vertical to horizontal is changed with Loader, depending
on Library's width. Vertical layout (old) is mostly the same as before.
Added new property categorySelected for categories. Items are also now
hoverable.

Task-number: QDS-4764
Change-Id: I031f3916f0d011fd76a963b247c238997d7a55d8
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Samuel Ghinet <samuel.ghinet@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-09-30 13:07:56 +00:00
Henning Gruendl
3c0b75f2ef QmlDesigner: Fix injection of parameters warning
* Fix a warning about injection of parameters into signal handlers being
  deprecated
* Fix comparison operator

Change-Id: I33d0fe21f39feea69bcca82a57036594d28b039a
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2021-08-17 10:00:10 +00:00
Mahmoud Badri
f820164b1a QmlDesigner: Use a different color for unimported items section
Fixes: QDS-3873
Change-Id: Ic713353d8fe5c1bfb4ff11f1224294ecde182fa7
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-03-16 09:16:21 +00:00
Henning Gruendl
db6ad528bb QmlDesigner: Implement new control design
* Update creator theme files and related enum
* Remove unused ActionIndicator functionality
* Update all controls (Colors, Positions, Sizes)
* Add global hover state and cleanup all other states
* Add global hover functionality to ButtonRow
* Add missing states
* Add new MenuItemWithIcon
* Add checkers.png for StateDelegate preview background
* Update copyright headers
* Replace AnchorButtons spacing
* Make ADS title bar buttons and tab bar buttons themeable
* Fix replace CSS colors to allow specifing alpha
* Fix replace CSS overwritting consecutive variables
* Make navigator icons and other elements themeable
* Make connection view themeable
* Make item library themeable
* Fix item library import path
* Update all HelperWidgets
* Fix GradientDialogPopup

Task-number: QDS-3768
Change-Id: I28a5fed178c95d098db052b8c2eabaa083d37b81
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2021-03-16 09:11:38 +00:00
Miikka Heikkinen
dfeff5b30d QmlDesigner: Search also possible imports in item library
Possible imports are now also parsed for items in item library.
They are only shown in case the search string is not empty.
Starting a drag of unimported item will automatically add the import.
Added a small manhattanlength check to the start of the drag to
avoid unwanted import additions on clicks.

Also fixed the item sorting to alphabetical order within categories.

Task-number: QDS-3825
Change-Id: I93366182af3fd7eda38bf94d53807393ecf92a08
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2021-03-05 13:28:22 +00:00
Mahmoud Badri
7d3ba0587f QmlDesigner: Fix item library expand issue
If a click happens on an item library item, mouse interaction
(expanding, collapsing sections, and showing context menu) is blocked
until some action happens (right-click for example). This is due
to a bug in QDrag. With this commit it is very hard to reproduce the
issue unless one's deliberately insisting to reproduce it.

Fixes: QDS-3792
Fixes: QDS-1652
Change-Id: I201b07aabf144adbb4d51e32c1fcc4990f89f5f9
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2021-02-23 12:25:22 +00:00
Marco Bubke
d1b0c12d6b QmlDesigner: Add image cache
The image cache is saving images and icon of this images in a sqlite
database. If there are no images they are generated in the backgound.
The icons are fetched by item library.

Task-number: QDS-2782
Task-number: QDS-2783
Task-number: QDS-2858
Change-Id: I5a32cccfef7f8fd8eb78902605a09f5da18ce88e
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2020-10-16 10:01:21 +00:00
Henning Gruendl
58ea14aea7 QmlDesigner: Controls 1 cleanup
* Replace ScrollView Controls 1 with ScrollView Controls 2
* Replace TabView with TabBar and StackLayout
* Remove unused styles
* Replace Controls 1 imports
* Remove print statement in FontSection
* Fix layout width by correcting CheckBox width
* Remove TabView from QtObjectPane

Task-number: QDS-2454
Task-number: QDS-2455
Task-number: QDS-2456
Change-Id: I913d326afb012375dd5b804171cb8cd67681514c
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-07-10 10:09:48 +00:00
Miikka Heikkinen
652596dc16 QmlDesigner: Update UI when an asset is reimported
Item library thumbnail and navigator icon are refreshed if asset is
reimported, and the puppet is restarted in case the asset is in use.

Change-Id: Ic5577eff3a24bcce87b504e9c059c29f6cb887a5
Fixes: QDS-1957
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-04-23 09:51:30 +00:00
Thomas Hartmann
8fb289f54b QmlDesigner: Add tooltips to item library
Task-number: QDS-342
Change-Id: I75530d5a05111ed66129f87e3fb716715b564001
Reviewed-by: Brook Cronin <brook.cronin@qt.io>
Reviewed-by: Henning Gründl <henning.gruendl@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2019-08-06 13:24:32 +00:00
Thomas Hartmann
3c08fb2668 QmlDesigner: Adjust font pixel size if pixel density is high
We define some fonts in pixel size and those have to be increased
if the pixel density is high.

Change-Id: I88e932d967aaa9d8757e733048d457e9e7c17f5b
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2018-04-10 13:18:44 +00:00
Thomas Hartmann
2df18ec34f QmlDesigner: Fix drag and drop
The release mouse event does not come through if we start a drag.
There was already a workaround that stopped working with 5.8 and
did rely on private API.
I removed all usage of private API and added a simple workaround
that synthesises a mouse release event.

The actual execution of the drag is now asynchronous to
ensure the release event is delivered properly.

I removed all dependencies on private API in the designer.

In Qt 5.9 the issue seems to be fixed in Qt.
The workaround does not seem to get in the way of the fix.
Eventually, the workaround can be removed.

Change-Id: I9b45b255da5e44c26aba2acf4a42f88537126f75
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-03-24 11:21:42 +00:00
Tim Jenssen
1de5bbd378 QmlDesigner: introduce a real Theme class
- rename Theming -> Theme
 - made derived colors as Q_INVOKABLE methods available
 - rename registerIconProvider -> setupTheme
 - inside *.qml files use a singleton import instead of a context

Before this change, every request for a theme value copied the map into the
Qml context including the convert of values QVariant -> QJSString

Change-Id: I1c483fb591336b519d5adab8ad37b42bc5a06720
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2017-03-09 17:20:36 +00:00
Alessandro Portale
dbe42bf040 QmlDesigner: Avoid double borders between items in the item library
Change-Id: I09ecba996d269a63ab24668f7f8a1c0669d9a2af
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@theqtcompany.com>
2016-07-28 11:28:41 +00:00
Thomas Hartmann
b8a22a5ec1 QmlDesigner: Rework of theming colors
* Use the original fancy toolbar colors by removing the
  Alpha channel.

* Use the splitter colors for borders to avoid white borders
  in light themes.

* Use the FancyToolButtonHoverColor for buttons and combo boxes.

Change-Id: Id636e0713c8e2769c5eb03a115a60ccad8226f23
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2016-07-28 10:59:58 +00:00
Thomas Hartmann
a017138e58 QmlDesigner: Adding theming support for Qt Quick Designer
With this patch the Qt Quick Designer supports:

*Flat
*Flat Dark
*Flat Light
*Classic

I did not test the dark style.

I added a template engine for the .css files. The syntax for the .css
files
is identical to the QML syntax.

Known issues:
* The icons in the property editor do not play well with the
  Flat Light style. We have to get proper Core:Icon support for the
  icons
  and most icons have to be simplified/flattened to fit the new style/
  theme.
* Some colors in the connection editor are still dark and hardcoded. But
  this looks ok together with all themes.
* The highlight colors are not taken from the theme, yet.

Change-Id: I94f2b75f92db8e131c2b15867dbabe9ae4b2f25a
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
2016-07-12 14:23:29 +00:00
Thomas Hartmann
2fc7b791ff QmlDesigner: Use smaller font in item library
This allows to show more items in the library.
While we get more and more components it is important
that we can show the increasing amount of items properly.

Change-Id: Ifc5db011b65b7accf96af5192ce2702b6f112da6
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2016-07-01 13:47:50 +00:00
Tobias Hunger
38cce7eb83 Update License according to agreement with Free Qt Foundation
* Update all files in share folder

Change-Id: I8a82c3eb2eb614d4339dd4c4e690f54b5f29d813
Reviewed-by: Alessandro Portale <alessandro.portale@theqtcompany.com>
2016-01-19 16:05:29 +00:00
Alessandro Portale
374f84acc7 Qt Quick Designer: License change to Qt Commercial + GPLv3
Change-Id: I7f7aecd02892b6c616cd148fa5d845e7bc0d3b4f
Reviewed-by: Tuukka Turunen <tuukka.turunen@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
Reviewed-by: Alessandro Portale <alessandro.portale@theqtcompany.com>
2015-09-18 12:12:57 +00:00
Eike Ziller
3c85058694 Update License
Change-Id: I711d5fb475ef814a1dc9d2822740e827f3f67125
Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
2015-01-16 12:37:56 +01:00
Eike Ziller
8295b503be License update
Change-Id: I3c22ef2685d7aa589f5d0ab74d693653a4c32082
Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
2014-10-09 11:41:44 +02:00
Marco Bubke
337c1b3b69 QmlDesigner: Tweak item library
Change-Id: Ia9f689c33e9590815cbd00bdf13d0d05466d37d0
Reviewed-by: Tim Jenssen <tim.jenssen@digia.com>
2014-07-04 14:22:38 +02:00
Tim Jenssen
b013637f22 QmlDesigner: remove delayed drag and drop call
Change-Id: I6d2c1c2f25ba88f3c6f0af9b52968a9bd005cd85
Reviewed-by: Marco Bubke <marco.bubke@digia.com>
2014-06-30 14:54:08 +02:00
Marco Bubke
cc68534e06 QmlDesigner: More quadratic size of item library delegates
Change-Id: Ie16f486fbe873fbec6663ac965e244c59c0e0e6b
Reviewed-by: Tim Jenssen <tim.jenssen@digia.com>
2014-06-23 14:10:33 +02:00
Tim Jenssen
5df2389970 QmlDesigner: rewrite itemlibrary
Change-Id: I31344f7cfa56ae5dd6662bef4e449007b7ec3ec4
Reviewed-by: Marco Bubke <marco.bubke@digia.com>
2014-06-19 18:07:47 +02:00