5575 Commits

Author SHA1 Message Date
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
Jaime van Kessel
ecba5b409c Fix binding loop in objectItemButton
CURA-8684
2022-01-31 17:32:10 +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
6db4a55f6e
Merge branch 'replace_controls_1_for_controls_2' into CURA-8684_QtControls_replacement_Buttons,_Actions_&_'Exclusivity'
Conflicts:
	plugins/ImageReader/ConfigUI.qml
	plugins/PerObjectSettingsTool/PerObjectSettingsPanel.qml
	plugins/PerObjectSettingsTool/SettingPickDialog.qml
	resources/qml/Dialogs/DiscardOrKeepProfileChangesDialog.qml
	resources/qml/Menus/ConfigurationMenu/CustomConfiguration.qml
	resources/qml/Preferences/GeneralPage.qml
	resources/qml/Preferences/Materials/MaterialsPage.qml
	resources/qml/Preferences/Materials/MaterialsView.qml
	resources/qml/Preferences/ProfilesPage.qml

These conflicts are all arising from headers/includes being updated at the same time, or from the two branches marking the other one's components as needing OldControls.
This introduced more OldControls markers which don't get marked as merge conflicts by Git. This happens when an element could just be left as the original name but from the new import (e.g. a Button stays a Button in Controls 2, but should be marked as from OldControls on the branch that doesn't update the Button).
2022-01-31 16:53:45 +01:00
casper
b2af6308e5 Add validator to material cost/weight spinboxes
This way only valid numbers can be entered

CURA-8684
2022-01-31 15:18:58 +01:00
casper
14767a92c6 Allow mouse selection in SpinBox
CURA-8684
2022-01-31 14:35:21 +01:00
casper
264ce3bdd1 Make texts fields selectable by mouse for various components
This enables mouse-selectable for
- The image reader dialog
- Layer view text field (in simulation view)
- The TextField with unit component (for instace used to set the scale
 of models)
- Rename dialog(s)
- Currency text field
- The settings filter text field

CURA-8684
2022-01-31 10:28:00 +01:00
casper
5aa67770a2 Add properties (with defaults) to the PrintSetupHeaderButton state-props
Resolves 2 QML-warnings

CURA-8684
2022-01-31 09:00:30 +01:00
casper
f94813a98e Fix description
CURA-8684
2022-01-31 08:59:23 +01:00
casper
8979632457 Resolve Qt warning
CURA-8684
2022-01-30 23:30:39 +01:00
casper
f62a5e7340 Allow decimal point for values input in materials view
CURA-8684
2022-01-30 23:19:11 +01:00
Ghostkeeper
fbb72d6f0a
Remove horizontal scrollbar policies from Cura.ScrollableTextArea
There is no horizontal scrollbar any more so these are giving errors now.

Contributes to issue CURA-8686.
2022-01-28 15:27:47 +01:00
Ghostkeeper
8d10e1d5a7
Simplify check for when quality profiles are activated
Should behave the same way.

Contributes to issue CURA-8686.
2022-01-28 11:34:44 +01:00
Ghostkeeper
92ed791f53
Simplify anchors of background rectangle
Contributes to issue CURA-8686.
2022-01-28 11:06:07 +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
casper
29fc98fea4 Add documentation to PrintSetupHeaderButton
CURA-8684
2022-01-28 10:33:01 +01:00
casper
4ef394fa2d Update manual printer control to QtControls 2
CURA-8684
2022-01-28 09:47:01 +01:00
Casper Lamboo
7f17ef6c51
Update resources/qml/PrintSetupHeaderButton.qml
Co-authored-by: Ghostkeeper <Ghostkeeper@users.noreply.github.com>
2022-01-27 16:04:17 +01:00
Casper Lamboo
a5e2e29055
Update resources/qml/Preferences/GeneralPage.qml
Co-authored-by: Ghostkeeper <Ghostkeeper@users.noreply.github.com>
2022-01-27 16:04:10 +01:00
Casper Lamboo
69de60eb14
Update resources/qml/Dialogs/OpenFilesIncludingProjectsDialog.qml
Co-authored-by: Ghostkeeper <Ghostkeeper@users.noreply.github.com>
2022-01-27 16:03:58 +01:00
Ghostkeeper
7a1c3e1bd5
Use customised TableView for Keep/Discard Changes dialogue
Had to make some more modifications to get it to work again this time, due to the way the width of the table scales with the dialogue. But it's nice now.

Contributes to issue CURA-8686.
2022-01-26 16:30:50 +01:00
Ghostkeeper
ec21b167d0
Resize columns when TableView is resized
They should retain their width proportionally.
This also fixes a case where the width of the TableView was initialised as 0 but then changed for some anchors due to weird bindings. Because it now updates the tableView when the width is changed.

Contributes to issue CURA-8686.
2022-01-26 16:29:09 +01:00
Ghostkeeper
fa177f5192
Implement section headers
I'm not real happy with the limitations I had to work with here. The TableView can only accept a table of strings, so I basically had to fit everything into editing this dictionary of strings. Not the best. But it's very effective.

Contributes to issue CURA-8686.
2022-01-26 15:37:17 +01:00
Ghostkeeper
5c71671585
Make setting names italic if changed in quality-changes profile
This was the behaviour before.

Contributes to issue CURA-8686.
2022-01-26 14:00:29 +01:00
casper
a2d03af2f1 Use states to set border&background color in print setup header button
CURA-8684
2022-01-26 12:15:13 +01:00
casper
a66275ce73 Fix PrintSetupHeaderButton displaying text twice
CURA-8684
2022-01-26 12:01:30 +01:00
casper
b3a6d8a1fc Use UM.Label in print setup header button
CURA-8684
2022-01-26 11:47:14 +01:00
casper
a74c7aa4f3 Remove unused contentItem
CURA-8684
2022-01-26 11:46:40 +01:00
Ghostkeeper
c973be3115
Use new TableView for profile overview
This requires some more changes that are not yet implemented: Italic text for things that were changed in the profile, and section headers. Let's see what I can do...

Contributes to issue CURA-8686.
2022-01-26 11:39:23 +01:00
Ghostkeeper
e607ae7b92
Show tooltip if text got elided
This way you can still see the whole text, even if the cell is too small. Handy.

Contributes to issue CURA-8686.
2022-01-26 11:24:41 +01:00
j.delarago
05d542c8d0 Bump UM version for CheckBox 2022-01-26 09:53:17 +01:00
Casper Lamboo
26bd68d891
Update resources/qml/Preferences/MachinesPage.qml
Co-authored-by: Jaime van Kessel <nallath@gmail.com>
2022-01-25 22:38:02 +01:00
Casper Lamboo
95c79e7921
Update resources/qml/Preferences/MachinesPage.qml
Co-authored-by: Jaime van Kessel <nallath@gmail.com>
2022-01-25 22:37:39 +01:00
Casper Lamboo
a3edf9e3e3
Update resources/qml/Preferences/MachinesPage.qml
Co-authored-by: Jaime van Kessel <nallath@gmail.com>
2022-01-25 22:33:51 +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
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
Casper Lamboo
ea60fdeacd
Update resources/qml/Preferences/MachinesPage.qml
Co-authored-by: Jaime van Kessel <nallath@gmail.com>
2022-01-25 15:59:17 +01:00
Ghostkeeper
2758957d5c
Use TabRow for material page selection
The contents of the page is done with a simple page that becomes visible or not. The easiest solution I could think of. No StackLayout necessary here.

Contributes to issue CURA-8686.
2022-01-25 13:57:47 +01:00
Ghostkeeper
cfafdf878a
Move contents of ProfileTab to ProfileOverview file
This way it is re-useable, and no longer connected to the concept of a tab view.

We can then display it in the profile manager.

Contributes to issue CURA-8686.
2022-01-25 13:34:13 +01:00
Ghostkeeper
50960ce5cf
Use UM.TabRow instead of a tab view
This styles it for us automatically.
However the contents of the tab disappears now. I'll have to restore that, but since that moves a bunch of code I'd rather do that in a separate commit.
I also changed the item to a column so that we don't have to link up the anchors very weirdly/difficulty with all of the buttons and messages that are optional. This just automatically makes space if there need to be extra buttons and messages in between, and even deals with the spacing correctly.

Contributes to issue CURA-8686.
2022-01-25 12:09:59 +01:00
Ghostkeeper
5f101e8233
Set checked tab for TabRowButton
We're changing this so that the button doesn't set this by itself. This is necessary so that I can use this TabRowButton also when it's not in a repeater (for the global stack in the profile manager).

Contributes to issue CURA-8686.
2022-01-25 11:58:44 +01:00
j.delarago
7f81a2aa8c Rename low quality CheckMark.svg -> Check.svg
Rename low quality Check.svg -> CheckThin.svg
2022-01-25 11:32:41 +01:00
j.delarago
a73ae6b655 Replace Cura.CheckBoxWithTooltip with UM.CheckBox.
Remove Cura.CheckBoxWithTooltip.qml from qmldir module definition.

Remove Cura.CheckBox.qml from qmldir module definition as it has been moved to Uranium
2022-01-25 11:08:52 +01:00
casper
c63b94375d Update materials slot preference menu to QtControls 2
CURA-8684
2022-01-24 23:34:38 +01:00
casper
b47c7c9395 Update materials view preference menu to QtControls 2
CURA-8684
2022-01-24 23:28:25 +01:00
casper
6dc535063b Update profiles preferences page to QtControls 2
CURA-8684
2022-01-24 22:37:39 +01:00
casper
b6e375a3be Update machines preferences page to QtControls 2
CURA-8684
2022-01-24 22:34:14 +01:00
casper
3e98282871 Update material preferences page to QtControls 2
CURA-8684
2022-01-24 22:31:36 +01:00