Commit Graph

45 Commits

Author SHA1 Message Date
Mahmoud Badri
cb93846367 QmlDesigner: Clear components view search box upon load
i.e. upon changing from edit mode to QDS mode. This also removed a
warning.

Change-Id: Ibd3ee3bd30febfcee9a05cb87047e79b8ed1bf61
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2022-05-24 09:38:59 +00:00
Mahmoud Badri
f09d4538e7 QmlDesigner: Implement Material Editor
Task-number: QDS-6438
Task-number: QDS-6439
Change-Id: I04e899a68aea665f0df8b65e21523632174ec76b
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@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-05-23 16:44:02 +00:00
Mahmoud Badri
45364d4327 QmlDesigner: Disable scrolling when context menu is open
Disable components and assets views scrolling when the context menu
is open.

Fixes: QDS-6317
Change-Id: Ibdbf29b14d0383fd2b876c655ccb17c35fdb6aff
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Samuel Ghinet <samuel.ghinet@qt.io>
2022-02-23 18:12:22 +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
9c5e6e2d8c QmlDesigner: Split components and assets libraries
Fixes: QDS-6151
Change-Id: Id6f79a2d1fcff5fb55d3ba3f1b1394f1f55ca36b
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Samuel Ghinet <samuel.ghinet@qt.io>
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>
2022-02-08 17:09:40 +00:00
Miikka Heikkinen
fe1f5a644e QmlDesigner: Enable component library context menu while searching
The only item visible in the menu is remove module, as hiding
categories during search is not supported.

Fixes: QDS-5687
Change-Id: I8f5bb3f1b27eb37ae32d72b93c6ce2156dfa8eb7
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2021-12-14 12:59:57 +00:00
Mahmoud Badri
5453c539b5 QmlDesigner: Remove flexible width from Component Library items
...so that resizing the view doesn't cause sluggish animation to the
items.
Also removed an unnecessary top padding from the horizontal lib to
avoid a slight vertical jump when switching between the 2 layouts.

Change-Id: I0af75db885398dc93fc234d760156a55042f59d0
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Samuel Ghinet <samuel.ghinet@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2021-12-08 19:03:01 +00:00
Miikka Heikkinen
590d01e8a9 QmlDesigner: Block modifying imports when editing in-file subcomponent
Adding import statements fails silently when editing in-file
subcomponent, and removing them can crash creator, so block various
cases in component library, navigator, and 3D edit view that do this.

Fixes: QDS-5353
Change-Id: Ide5429cd97d2bf78f884b14e83cdffd10399f929
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-11-05 12:44:21 +00:00
Mahmoud Badri
7ca826e2f3 QmlDesigner: Close component library's context menus when layout change
Fixes: QDS-5351
Change-Id: I06e02b7c137d2398528e6d4120d9ffbc7632c7a7
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2021-11-01 11:07:35 +00:00
Mahmoud Badri
5de4743bb4 QmlDesigner: Persist horizontal component library's selected category
Moved showing and hiding categories logic to Cpp side so that:
- Currently selected category is persisted when the component library
  model is reset.
- QML side is clean of the mix of logic and UI.

Also reworked some logic/variables that are making the logic complex.

Task-number: QDS-5215
Change-Id: I8e9f5893f37a982283f1b1be9fee022f0b8afa32
Reviewed-by: Samuel Ghinet <samuel.ghinet@qt.io>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2021-10-19 14:13:58 +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
c116b25709 QmlDesigner: Add collapse/expand all to sections
Add the functionality to collapse/expand all section in the property at
once by calling a context menu on one of the section headers and
choosing the appropriate menu item.
Make some adjustments in Assets and ItemsView so it won't collide with
the context menus used there.

Task-number: QDS-4757
Change-Id: Ied9dabdbb4359a05b654bfc2a26829da46700239
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-08-05 10:00:42 +00:00
Miina Puuronen
2c8a9a6761 QmlDesigner: Fix showing Component Library module context menu
The context menu for modules and categories was not working properly
during search. The menu is now disabled whenever the search is
ongoing, as it's unnecessary to show it at that time.

Fixes: QDS-4230
Change-Id: If0465f973188d199982e87e765fbfe1efb641bb7
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2021-05-20 10:00:41 +00:00
Miina Puuronen
5c2a95b035 QmlDesigner: Fix Component Library context-menu option disable state
Update the state of categories hide state property when removing a
module so that "Show All Hidden Categories" context menu option enable
state is updated after removing a module.

Fixes: QDS-4226
Change-Id: I7c963e92e6e94e28856a5e51f75ae618b3b684ec
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2021-04-23 13:14:51 +00:00
Miina Puuronen
24d88de228 QmlDesigner: Implement hiding component library categories
Task-number: QDS-3822
Change-Id: I4e22385497c4e58725b7f7a62a4e4351d0b78661
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-04-08 08:53:25 +00:00
Mahmoud Badri
a52c2519e3 QmlDesigner: Fix import version when adding unimported module
Fixes: QDS-3994
Change-Id: If39df641cbfb563a169b3b2e8001f68941fd398c
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-03-23 08:15:51 +00:00
Mahmoud Badri
c5b72d4d74 QmlDesigner: Rename "Import Module" to "Add Module"
...in the context menu for items in the "All Other Components" section.

Fixes: QDS-4009
Change-Id: I1e561d61f8580fdeb7828c438b9b23d92516efec
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-03-22 18:44:42 +00:00
Mahmoud Badri
9e960d09a3 QmlDesigner: Correct item library spacings
Regression caused by db6ad528bb

Fixes: QDS-3855
Change-Id: I4a91a66fcfaf6cbd013bc54a65344cb7f3171798
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-03-22 09:22:51 +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
6fdb34994c QmlDesigner: Ensure item library content is visible
Make sure the ScrollView content area is visible after content size
changes.

Fixes: QDS-3795
Change-Id: I1f7408db9ad318a5c54b5186569dd04235a3d952
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2021-03-08 13:10:30 +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
80dfaf3be3 QmlDesigner: Expand collapsed component categories when searching
- Expand collapsed categories in the following 2 cases:
  - When searching.
  - When choosing "Expand all" from the context menu.
- Update only changed data when expand state changes rather than
resetting the whole model.
- Update search after adding a new QML import and switching to
the components view.

Task-number: QDS-3781
Task-number: QDS-3784
Task-number: QDS-3789
Change-Id: I09e6f1f97171cd9172cadf4202dd8d02cbb78513
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2021-02-23 09:17:06 +00:00
Mahmoud Badri
abc0559316 Fix property editor expand not working regression
Regression caused by 43eaa09b11

Change-Id: Ia749672464790b235f292efe09b6cc48e1df6b6e
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Henning Gründl <henning.gruendl@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-02-22 16:13:45 +00:00
Mahmoud Badri
43eaa09b11 Add components library expand/collapse all context menu options
also change import name from "library" to "module" and relevant tweaks.

Task-number: QDS-3589
Change-Id: Ib467dda61b6720cebe843e34cb807aee6221f5cb
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-02-18 18:43:57 +00:00
Mahmoud Badri
151184a609 Implement new item library UI
- Create a new header qml widget.
- Move tabs and filtering search to the header widget.
- Add imports/assets using a new "+" button on the tabs.
- Remove import flow tag view (still some remainings to be removed in another commit).
- Change layout from grid to vbox.
- Rename some classes and variables to make them clearer.
- New "Add Library" view that replaces the QML imports view (older QML imports classes removed).
- Enable Search in the "add import" view.
- Hide category header if only 1 category is under an import.
- Assorted relevant fixes, tweaks, and clean ups.

Task-number: QDS-3589
Change-Id: I710aed50858b32e024200911c6a21fd963e1b692
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Henning Gründl <henning.gruendl@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-02-17 09:38:20 +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
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
05d969a61b QmlDesigner: Move HelperWidgets
Having the HelperWidgets next to the QtQuick directory was triggering
a bug in Qt (QTBUG-64237).

The property editor was white with Qt 5.10, because the "." import is
mapped to "./QtQuick" and was confused with QtQuick 2.x.

Task-number: QTCREATORBUG-19194
Change-Id: I4148d8e40f1e886eb41ffe6f4df62b213af5e9c3
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-11-06 18:02:02 +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
Thomas Hartmann
477e5e6b7e QmlDesigner: Keep track of the collapsed state of sections
When a section in the item library is colllapsed, then
the designer should remember this. This was already implemented,
but the feature stop working, because of refactoring.

Change-Id: Ib4465b87ade7b0c8ff501dea9893ee98caaae753
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-01-04 13:49:44 +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
Thomas Hartmann
eb34226adb QmlDesigner: Remove animations from item library
The animation serves no purpose.

Change-Id: If17d1ee31ff5a0de9832edff204adbc4f82f6c43
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2016-07-01 13:47:31 +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
Marco Bubke
826525f89f QmlDesigner: Add item library section visibility
Search is working again

Change-Id: Ie6d52f476e2b9b5c3256bc289bcdd5dcadafea93
Reviewed-by: Tim Jenssen <tim.jenssen@digia.com>
2014-06-23 22:23:02 +02:00
Marco Bubke
44685b535d QmlDesigner: Promote visibility changes of item library items
Change-Id: Ie4b70a2785fbd9199a81ffaf879f521431aa609d
Reviewed-by: Tim Jenssen <tim.jenssen@digia.com>
2014-06-23 22:22:48 +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
Tim Jenssen
115620aabc QmlDesigner: cleanup unused methods
- remove javascript methods: scrollView(delta), resetView()
 - remove javascript related signals
 - remove visibleCount debug output

Change-Id: I63b0a204d7f570986e41fc9fb3762f13e5d63d79
Reviewed-by: Marco Bubke <marco.bubke@digia.com>
2014-06-18 16:53:51 +02:00
Tim Jenssen
ef87889b63 QmlDesigner: add reload feature to item library view
Change-Id: Ib71dc235abd059056063c5d9b9072c8bdc932762
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
2014-06-11 14:13:22 +02:00