When clicking outside any view that has sections and a section's
context-menu is visible, it is now closed.
Fixes: QDS-9564
Change-Id: I73cd3a9754c5a18360427525a2a943c2c549e83f
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Henning Gründl <henning.gruendl@qt.io>
Section collapse all and expand all functionalities are controlled via
a singleton instance. Since multiple views are now sharing QML engine,
they also share this controller singleton. Therefore it is necessary
to allow user of the Section to specify which category the section
belongs to, so that invoking expand all from one view doesn't
expand sections in another view, but only sections in the same
category.
This also allows fine tuning which sections are grouped within a view,
which was not possible previously.
Fixes: QDS-9248
Change-Id: I0a1c870e6746580255a02f91d590eb80ce6ebcbe
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
The event filter has to be installed on the actual QQuickWidget.
Using registerPropertyMap instead of global context properties.
Task-number: QDS-9124
Change-Id: Ic4d26081bb10b4cb4c8cca7050180feb1c081664
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Drag now correctly accepts only assets that can be used as textures.
"selected_texture_changed" custom notification was used in two
semantically slightly different cases, both to indicate selected
texture had changed and that selection should change, which was little
confusing. Split the two cases to separate custom notifications to
clarify the situation and allow "select_texture" to be handled in
material browser even if it sent it. This fixes the issue of newly
added texture not getting selected after drag, because creation was
done by material browser view.
Similar issue was fixed with "selected_material_changed" as well.
Also fixed a couple of cases of drag not being properly ended.
Change-Id: Ie1cae01ef13b687d9e611ac1c91443688001fe49
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
This is to avoid search box focus loss if search autoexpands sections.
Fixes: QDS-9259
Change-Id: Ief99643d52413fe83d4b5ac5ea3438d6116d64c7
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
When dragging an image from the Assets Library to the Textures section
of the Material Browser, now Textures will be created from those
assets.
Task-number: QDS-8783
Change-Id: Ibbfb8697705a7d1af7714f3a32caff24282ee7a9
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Fix an issue that appears when pressing the button and moving away from
it but still hold the mouse button down.
Change-Id: I06b456e410352862ea28f04e7cfaf3bdb27ae7d4
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Fixed focus loss on context menu close.
Fixed an issue with main view also handling cursor and enter keys when
editing material name.
Expanding a section now focuses the expanded section.
Dragging items from content library now focuses correct section.
Fixes: QDS-9215
Change-Id: I2176c7e52d8855c547db426b55ab739ca8f1db06
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
When DockWidgetTab or DockWidget is focused, typically user actually
wants to focus the content widget, so we now do that.
Focusing content widget is done asynchronously to avoid complications
from doing another setFocus in middle of setFocus handling.
Fixes: QDS-9104
Change-Id: I569639c2f36f0721aafcdcab3498c875e98993a9
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Also refactors ensuring visibility of selected item as the old way
broke when searching.
Fixes: QDS-9109
Change-Id: I87e45ff04a32e4de0adb7029cdfa47b058fa0f61
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
When selection changes in material browser, the browser grid is
scrolled so that the selected item is visible.
Fixes: QDS-9010
Change-Id: Ie6f4383b0c8add2965fc42ffdf740effdf02fa67
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
The focus grabber mouse area was interfering with mouse cursor on
controls under it. There is no need to have grabber cover the search
box, as clicking search box anyway moves focus.
Task-number: QDS-9163
Change-Id: Ie2487296914a893dfc658ff8178963233a50c467
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Open and/or focus material or texture editor on enter key press on
material browser.
Fixes: QDS-9106
Change-Id: I55bd6143c3285f2fbcfa093063e84747b96590c9
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Keyboard navigation now accounts for collapsed sections and
items hidden with search filter. Also, navigation is suppressed
while search box has focus.
Fixes: QDS-9108
Change-Id: I9fb555803cd72fb3550d5e30e20c62a40f845ef3
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
The actual bug is somewhere deep in the Qml ScrollBar's implementation.
The workaround is to disable the scrollbar while dragging is on.
Fixes: QDS-7849
Change-Id: I9bedd8a8f0947c0e3d1a01e6d6e9962e9826d460
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Apply to selected model/material, delete, duplicate, and
create new options are available in the menu.
Fixes: QDS-8342
Change-Id: Ib9bdc1738500a87361000bcd3e89403e3b8ccef8
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
If material library is missing, material browser and editor UI should
be disabled, except for material editor main pane in case of root
material node.
Change-Id: I3d2bd545de0649fb90d3fe1f751d46b7c7054bbf
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
For now texture selection is independent from material selection.
Change-Id: Iffa8354948f0ce64e4a54458531274e0441e87ea
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Material name field in material browser now ensures that the start
of the string is visible when editing is not focused.
Any click outside the name field will take the focus away from the
field, and name field state is properly updated when focus goes
away for any reason.
Trying to set same name as before is ignored instead of changing the
name to <oldName>1.
Fixes: QDS-8185
Change-Id: I723e3ae312e3e2c4ce8a95a3b05effcee2bae328
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Prevent categories auto-expanding when adding an bundle material
instance. Also some relevant tweaks.
Fixes: QDS-8043
Change-Id: Id87886c6d6e065f2c9c1253279348e076bc4d97f
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Make sure material browser sections that have matches are expanded while
searching.
Fixes: QDS-7836
Change-Id: Ie30c5425e8efee65cc4bdfa473b269841e73a9d3
Reviewed-by: Samuel Ghinet <samuel.ghinet@qt.io>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>