mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-05-25 07:39:25 +08:00
Merge pull request #1556 from Ultimaker/feature_more_spacing_override_profile_combobox
Add more spacing between the label and combobox for override profile option
This commit is contained in:
commit
6d1a99ff33
@ -361,12 +361,6 @@ UM.PreferencesPage
|
|||||||
width: UM.Theme.getSize("default_margin").width
|
width: UM.Theme.getSize("default_margin").width
|
||||||
}
|
}
|
||||||
|
|
||||||
Label
|
|
||||||
{
|
|
||||||
font.bold: true
|
|
||||||
text: catalog.i18nc("@label", "Override Profile")
|
|
||||||
}
|
|
||||||
|
|
||||||
UM.TooltipArea
|
UM.TooltipArea
|
||||||
{
|
{
|
||||||
width: childrenRect.width;
|
width: childrenRect.width;
|
||||||
@ -374,37 +368,48 @@ UM.PreferencesPage
|
|||||||
|
|
||||||
text: catalog.i18nc("@info:tooltip", "When you have made changes to a profile and switched to a different one, a dialog will be shown asking whether you want to keep your modifications or not, or you can choose a default behaviour and never show that dialog again.")
|
text: catalog.i18nc("@info:tooltip", "When you have made changes to a profile and switched to a different one, a dialog will be shown asking whether you want to keep your modifications or not, or you can choose a default behaviour and never show that dialog again.")
|
||||||
|
|
||||||
ComboBox
|
Column
|
||||||
{
|
{
|
||||||
id: choiceOnProfileOverrideDropDownButton
|
spacing: 4
|
||||||
width: 300
|
|
||||||
|
|
||||||
model: ListModel
|
Label
|
||||||
{
|
{
|
||||||
id: discardOrKeepProfileListModel
|
font.bold: true
|
||||||
|
text: catalog.i18nc("@label", "Override Profile")
|
||||||
Component.onCompleted: {
|
|
||||||
append({ text: catalog.i18nc("@option:discardOrKeep", "Always ask me this"), code: "always_ask" })
|
|
||||||
append({ text: catalog.i18nc("@option:discardOrKeep", "Discard and never ask again"), code: "always_discard" })
|
|
||||||
append({ text: catalog.i18nc("@option:discardOrKeep", "Keep and never ask again"), code: "always_keep" })
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
currentIndex:
|
ComboBox
|
||||||
{
|
{
|
||||||
var index = 0;
|
id: choiceOnProfileOverrideDropDownButton
|
||||||
var code = UM.Preferences.getValue("cura/choice_on_profile_override");
|
width: 200
|
||||||
for (var i = 0; i < model.count; ++i)
|
|
||||||
|
model: ListModel
|
||||||
{
|
{
|
||||||
if (model.get(i).code == code)
|
id: discardOrKeepProfileListModel
|
||||||
{
|
|
||||||
index = i;
|
Component.onCompleted: {
|
||||||
break;
|
append({ text: catalog.i18nc("@option:discardOrKeep", "Always ask me this"), code: "always_ask" })
|
||||||
|
append({ text: catalog.i18nc("@option:discardOrKeep", "Discard and never ask again"), code: "always_discard" })
|
||||||
|
append({ text: catalog.i18nc("@option:discardOrKeep", "Keep and never ask again"), code: "always_keep" })
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return index;
|
|
||||||
|
currentIndex:
|
||||||
|
{
|
||||||
|
var index = 0;
|
||||||
|
var code = UM.Preferences.getValue("cura/choice_on_profile_override");
|
||||||
|
for (var i = 0; i < model.count; ++i)
|
||||||
|
{
|
||||||
|
if (model.get(i).code == code)
|
||||||
|
{
|
||||||
|
index = i;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return index;
|
||||||
|
}
|
||||||
|
onActivated: UM.Preferences.setValue("cura/choice_on_profile_override", model.get(index).code)
|
||||||
}
|
}
|
||||||
onActivated: UM.Preferences.setValue("cura/choice_on_profile_override", model.get(index).code)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user