58 Commits

Author SHA1 Message Date
j.delarago
b2bed4efdd Fix setting visibility styling working in one theme and not the other.
CURA-8688
2022-03-02 09:06:47 +01:00
Jaime van Kessel
f682f56923 Merge branch 'master' of github.com:Ultimaker/Cura into replace_controls_1_for_controls_2 2022-02-17 15:02:03 +01:00
j.delarago
c57220f33c Fix search icon having no left padding in DF search bar. 2022-02-07 13:20:45 +01:00
Evangelos Trantos
d7c3495509
Merge pull request #11328 from Ultimaker/CURA-8378_improve_checkbox_visibility
Cura 8378 improve checkbox visibility
2022-02-02 19:54:34 +02:00
Ghostkeeper
02c517a841
Enforce minimum column width through binding formula
We can't enforce it when resizing, due to the width rescaling with the width. But we can enforce it through the binding formula after applying the width scale.

Contributes to issue CURA-8686.
2022-02-01 13:04:16 +01:00
Ghostkeeper
8de1f923a4
Fix clicking, and don't allow dragging if not needed
When I changed the MouseArea into a TooltipArea, the clicking broke because the tooltip area doesn't catch mouse events. I could add another mouse area on top, but for better efficiency it's nice to re-use the TooltipArea. Just need to remember to allow clicking it.
I also found a small issue where you could flick the table even if it's not big enough to scroll. This should fix that.

Contributes to issue CURA-8686.
2022-02-01 11:54:43 +01:00
Ghostkeeper
ee81326d6a
Fix remaining merge conflicts
- When both branches added Controls1 as OldControls, it's not marked as a merge conflict. But the merge removed the need for OldControls, so the import can be removed.
- There was one instance where I had removed the OldControls for a checkbox but there it should remain since the checkboxes are updated in a separate ticket.

Contributes to issue CURA-8684.
2022-01-31 17:08:56 +01:00
Ghostkeeper
7bc109d1f0
Remove outdated comment
It's no longer limiting the width to be at least 10 pixels, due to how it has to scale with the width of the table.

Contributes to issue CURA-8686.
2022-01-28 10:57:00 +01:00
Ghostkeeper
43d4075309
Bring changes from TableView to Digital Library version
The classes should be approximately the same. There's 2 differences now though:
* The ScrollBar is re-implemented in the Digital Library because the re-useable component is not available in all Cura editions that the Digital Library needs to support.
* The sections are not working. It was removing big parts of the table for some reason and I don't think it's worth debugging since this version of the table doesn't use it at all. It's also a bit faster this way.

Contributes to issue CURA-8686.
2022-01-26 17:24:24 +01:00
j.delarago
05d542c8d0 Bump UM version for CheckBox 2022-01-26 09:53:17 +01:00
Ghostkeeper
f22fea5f22
Scroll back to top when contents of table change
Contributes to issue CURA-8686.
2022-01-25 19:05:54 +01:00
Ghostkeeper
2a5abfdb01
Downgrade UM version, re-implementing scroll bar
This plug-in needs to be compatible with Cura 4.9 and up, which means we can't use UM.ScrollBar.

Contributes to issue CURA-8686.
2022-01-25 18:53:52 +01:00
Ghostkeeper
c6eb1e668d
Rename tableScrollView to tableBase
It is no longer a scrollview, after all, since the TableView itself already scrolls (and leaves the header nicely at the top this way).

Contributes to issue CURA-8686.
2022-01-25 18:51:03 +01:00
Ghostkeeper
83953b03b4
Use new table element for saving files as well
Re-using that component.

Contributes to issue CURA-8686.
2022-01-25 18:48:45 +01:00
Ghostkeeper
a4ef86609f
Implement option to disable selections
Sometimes you don't want the user to be able to highlight certain rows.

Contributes to issue CURA-8686.
2022-01-25 18:48:06 +01:00
Ghostkeeper
6457410a53
Copy new Table implementation to Cura.TableView
There we can re-use it. We can't re-use that implementation from the Digital Library itself, since that plug-in needs to be compatible with older Cura versions as well.

Contributes to issue CURA-8686.
2022-01-25 18:37:34 +01:00
Ghostkeeper
39e29ae768
Fix QML warning of 0 height from before table is filled
If there is no model data, the cells will be empty and would have a height of 0. The table warns us that a height of 0 is not allowed.

Contributes to issue CURA-8686.
2022-01-25 18:34:04 +01:00
Ghostkeeper
2429f28b7f
Limit column widths to not exceed the total width of the table
A bit clunky, but very effective!

This way we don't have to deal with clipping or scrolling horizontally.

Contributes to issue CURA-8686.
2022-01-25 18:31:43 +01:00
Ghostkeeper
279c23f5aa
Elide header text too
Otherwise it just overlaps with the next column.

Contributes to issue CURA-8686.
2022-01-25 18:26:15 +01:00
Ghostkeeper
c6717c67f4
Don't let table overlap lining
Contributes to issue CURA-8686.
2022-01-25 18:24:38 +01:00
Ghostkeeper
88bf1995c0
Fix cell height adjusting to content
To be honest, I'm not entirely sure why it only works here if I use implicitHeight instead of height.

Contributes to issue CURA-8686.
2022-01-25 18:22:38 +01:00
Ghostkeeper
bbb40d9b11
Allow double-clicking on a file to open it
Contributes to issue CURA-8686.
2022-01-25 18:19:08 +01:00
Ghostkeeper
a7da4e4ef9
Fix integration with new table view
Only a single selected item for the moment.

Contributes to issue CURA-8686.
2022-01-25 18:11:30 +01:00
Ghostkeeper
59494cdace
Implement selection
Contributes to issue CURA-8686.
2022-01-25 18:03:45 +01:00
Ghostkeeper
5671b6c61f
Replace TableView with custom implementation
I intend to copy this implementation to mainline Cura when it's done.

Contributes to issue CURA-8686.
2022-01-25 17:51:48 +01:00
j.delarago
5788ea8d00 The visibility settings in the preferences is defined in Uranium rather than Cura. The CheckBox has been moved to Uranium so that all parts of the project have access to this default styled component. 2022-01-24 14:03:47 +01:00
Ghostkeeper
efcd00e2f3
Merge branch 'master' into marketplace_redesign
Conflicts:
	plugins/DigitalLibrary/resources/qml/SelectProjectPage.qml -> Some things were probably accidentally committed here and then later also changed in master.
2022-01-20 15:57:28 +01:00
Ghostkeeper
e0a6cb3383
Merge branch 'master' into replace_controls_1_for_controls_2
Conflicts:
	resources/qml/Actions.qml -> Translation fixes on master, while the QML elements were changed here for Controls2.
2022-01-18 17:17:10 +01:00
Ghostkeeper
73a151ab49
Put focus on search bar when Digital Library opens
Fixes CURA-8768.
2022-01-13 13:55:42 +01:00
Jaime van Kessel
2aa931cbca Remove unneded styles import 2022-01-04 09:48:02 +01:00
casper
02c81234d0 Remove references to the toolbox plugin from the themes.json
Some other components were (incorrectly) using these theme variables.
Replaced them by another theme variable with the same value.

CURA 8588
2021-12-30 13:38:16 +01:00
Remco Burema
b5d58f78d7
Fix: Actually make SearchBar-component independant.
It still depended on the Digital Library 'parent'.

part of CURA-8559
2021-11-12 11:49:37 +01:00
Remco Burema
977a12c989
Steal search-bar from DigitalFactory.
Make 'SearchBar' into a reusable component, so it can be used in the (new) Marketplace search. Also now at least the word 'Search' can be translated ;-)

part of CURA-8559
2021-11-12 09:52:24 +01:00
Jaime van Kessel
183fbfad41 Disable save to DF if the textfield is in an invalid state
CURA-8502
2021-08-30 11:09:55 +02:00
Jaime van Kessel
8b2904ee3b Merge branch 'CURA-8441_campaign_links' of github.com:Ultimaker/Cura 2021-08-09 14:09:27 +02:00
Konstantinos Karmas
97c779cc53 Use the old icon names
So that they can still be found in 4.9 and 4.10 Cura version.

CURA-8444
2021-08-06 09:50:04 +02:00
Konstantinos Karmas
10ec9e2754 Remove the tooltipWidth property
The `tooltipWidth` property is not available in 4.9 and 4.10. This property was added to make sure that the tooltip has a smaller width than the DigitalLibrary window, or else the tooltip doesn't get drawn at all, which is confusing. Since it was not available in 4.9 and 4.10, the tooltip text smaller had to become smaller to make sure that it will fit.

CURA-8444
2021-08-06 09:49:29 +02:00
Konstantinos Karmas
22e407207f Manually add the magnifier icon in the search bar in DL
The `leftIcon` property, which is not available in 4.9 and 4.10, so the DigitalLibrary window wasn't getting drawn. To keep having the icon, I manually added the RecolorImage in the search textfield.

CURA-8444
2021-08-06 09:47:47 +02:00
Jaime van Kessel
57e66a5796 Add campaign links
CURA-8441
2021-08-05 15:42:23 +02:00
Ghostkeeper
50e0885b55
Apply clipping paths in this image
QtSVG doesn't support clipping paths. QtSVG only supports the SVG 1.2 Tiny specification. See https://doc.qt.io/qt-5/svgrendering.html for more information on exact support.
2021-07-21 13:10:14 +02:00
Remco Burema
86d104afe7
DL: Allow 1 char filenames (not counting extension).
CURA-8395
2021-07-20 18:01:44 +02:00
Remco Burema
71937bf828
DL: Align with online backend on allowed characters.
CURA-8395
2021-07-20 17:58:29 +02:00
Ghostkeeper
cc82ff97a7
Merge branch 'CURA-8112_Inform_the_user_about_their_subscription_limits' 2021-07-16 10:04:43 +02:00
Konstantinos Karmas
82c189327d Change link of "Upgrade plan" button
CURA-8112
2021-07-15 16:36:49 +02:00
Jaime van Kessel
e9ecba1374
Remove bindingloop in project selector 2021-07-14 16:03:06 +02:00
Konstantinos Karmas
11d86b98ef Merge branch 'master' into CURA-8112_Inform_the_user_about_their_subscription_limits 2021-07-14 15:52:27 +02:00
Konstantinos Karmas
016371d771 Add the external link icon to the Upgrade plan button
CURA-8112
2021-07-14 14:34:00 +02:00
Konstantinos Karmas
f643f19af6 Fix tooltip not shown when the tooltip text is too long
When the tooltip text is too long and the tooltip width ends up being longer than the window it is supposed to be drawn into, the tooltip is not drawn at all. This commit fixed that by allowing the tooltip width of the ActionButton to be changed within QML, limiting it to a certain size that fits the purpose.

CURA-8112
2021-07-13 17:30:30 +02:00
Konstantinos Karmas
2d45b8c2cd Show an "Upgrade plan" button to users that have reached maximum projects
Instead of letting users go through the project creation process only to get rejected with a "subscription limits reached" message, now the "New Library project" button is being replaced with an "Upgrade plan" button when the maximum allowed projects have been reached for the specific amount. The button is accompanied by a tooltip that explains the situation to the user. Once clicked, the user is redirected to the subscriptions page.

CURA-8112
2021-07-13 17:28:38 +02:00
Ghostkeeper
eb2a315e42
Specify spacing between search bar and button
Instead of using the default of 5 pixels, we should use this element from the theme to match the margin around the page.

Contributes to issue CURA-8009.
2021-07-13 16:09:02 +02:00