mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-12 20:39:01 +08:00
More spacing for override profile combobox
This commit is contained in:
parent
07cfe76edb
commit
8f3e7c6fa5
@ -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: 300
|
||||||
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