mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-07 14:04:03 -06:00
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).
This commit is contained in:
commit
6db4a55f6e
98 changed files with 3984 additions and 4921 deletions
|
@ -1,12 +1,11 @@
|
|||
// Copyright (c) 2020 Ultimaker B.V.
|
||||
// Copyright (c) 2022 Ultimaker B.V.
|
||||
// Cura is released under the terms of the LGPLv3 or higher.
|
||||
|
||||
import QtQuick 2.10
|
||||
import QtQuick.Controls 1.1 as OldControls
|
||||
import QtQuick.Controls 2.3
|
||||
import QtQuick.Controls 2.15
|
||||
import QtQuick.Layouts 1.1
|
||||
|
||||
import UM 1.1 as UM
|
||||
import UM 1.5 as UM
|
||||
import Cura 1.1 as Cura
|
||||
|
||||
UM.PreferencesPage
|
||||
|
@ -15,6 +14,8 @@ UM.PreferencesPage
|
|||
title: catalog.i18nc("@title:tab", "General")
|
||||
id: generalPreferencesPage
|
||||
|
||||
width: parent.width
|
||||
|
||||
function setDefaultLanguage(languageCode)
|
||||
{
|
||||
//loops through the languageList and sets the language using the languageCode
|
||||
|
@ -124,16 +125,28 @@ UM.PreferencesPage
|
|||
pluginNotificationsUpdateCheckbox.checked = boolCheck(UM.Preferences.getValue("info/automatic_plugin_update_check"))
|
||||
}
|
||||
|
||||
OldControls.ScrollView
|
||||
ScrollView
|
||||
{
|
||||
id: preferencesScrollView
|
||||
width: parent.width
|
||||
height: parent.height
|
||||
|
||||
ScrollBar.vertical: UM.ScrollBar
|
||||
{
|
||||
id: preferencesScrollBar
|
||||
parent: preferencesScrollView
|
||||
anchors
|
||||
{
|
||||
top: parent.top
|
||||
bottom: parent.bottom
|
||||
right: parent.right
|
||||
}
|
||||
}
|
||||
|
||||
Column
|
||||
{
|
||||
|
||||
//: Language selection label
|
||||
UM.I18nCatalog{id: catalog; name: "cura"}
|
||||
width: preferencesScrollView.width - preferencesScrollBar.width
|
||||
|
||||
Label
|
||||
{
|
||||
|
@ -160,16 +173,14 @@ UM.PreferencesPage
|
|||
Component.onCompleted:
|
||||
{
|
||||
append({ text: "English", code: "en_US" })
|
||||
// append({ text: "Čeština", code: "cs_CZ" })
|
||||
append({ text: "Čeština", code: "cs_CZ" })
|
||||
append({ text: "Deutsch", code: "de_DE" })
|
||||
append({ text: "Español", code: "es_ES" })
|
||||
//Finnish is disabled for being incomplete: append({ text: "Suomi", code: "fi_FI" })
|
||||
append({ text: "Français", code: "fr_FR" })
|
||||
append({ text: "Italiano", code: "it_IT" })
|
||||
append({ text: "日本語", code: "ja_JP" })
|
||||
append({ text: "한국어", code: "ko_KR" })
|
||||
append({ text: "Nederlands", code: "nl_NL" })
|
||||
//Polish is disabled for being incomplete: append({ text: "Polski", code: "pl_PL" })
|
||||
append({ text: "Português do Brasil", code: "pt_BR" })
|
||||
append({ text: "Português", code: "pt_PT" })
|
||||
append({ text: "Русский", code: "ru_RU" })
|
||||
|
@ -182,6 +193,12 @@ UM.PreferencesPage
|
|||
{
|
||||
append({ text: "Pirate", code: "en_7S" })
|
||||
}
|
||||
|
||||
// incomplete and/or abandoned
|
||||
append({ text: catalog.i18nc("@heading", "-- incomplete --"), code: "" })
|
||||
append({ text: "Magyar", code: "hu_HU" })
|
||||
append({ text: "Suomi", code: "fi_FI" })
|
||||
append({ text: "Polski", code: "pl_PL" })
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -193,8 +210,7 @@ UM.PreferencesPage
|
|||
model: languageList
|
||||
Layout.fillWidth: true
|
||||
|
||||
currentIndex:
|
||||
{
|
||||
function setCurrentIndex() {
|
||||
var code = UM.Preferences.getValue("general/language");
|
||||
for(var i = 0; i < languageList.count; ++i)
|
||||
{
|
||||
|
@ -204,13 +220,23 @@ UM.PreferencesPage
|
|||
}
|
||||
}
|
||||
}
|
||||
onActivated: UM.Preferences.setValue("general/language", model.get(index).code)
|
||||
|
||||
currentIndex: setCurrentIndex()
|
||||
|
||||
onActivated: if (model.get(index).code != "")
|
||||
{
|
||||
UM.Preferences.setValue("general/language", model.get(index).code);
|
||||
}
|
||||
else
|
||||
{
|
||||
currentIndex = setCurrentIndex();
|
||||
}
|
||||
}
|
||||
|
||||
Label
|
||||
{
|
||||
id: currencyLabel
|
||||
text: catalog.i18nc("@label","Currency:")
|
||||
text: catalog.i18nc("@label", "Currency:")
|
||||
}
|
||||
|
||||
TextField
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue