17 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
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
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
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
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
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
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