Merge branch '15.06'

* 15.06:
  Format after translating, not before
  Change "Update" back to "Update Firmware"
  Properly translate mode menu
  Add russian translations
  Add missing translations to the list of translations to build
  Remember the previuos active tool on selection change
  Use python's webbrowser instead of Qt.openUrlExternally for opening urls
  adds styling for both the regular as the indeterminate progressbar
  adds styling for a regular progressbar
This commit is contained in:
Arjen Hiemstra 2015-06-17 16:15:00 +02:00
commit 7949385764
11 changed files with 2433 additions and 40 deletions

View File

@ -4,7 +4,7 @@ cmake_minimum_required(VERSION 2.8.12)
set(URANIUM_SCRIPTS_DIR "${CMAKE_SOURCE_DIR}/../uranium/scripts" CACHE DIRECTORY "The location of the scripts directory of the Uranium repository")
if(${URANIUM_SCRIPTS_DIR})
if(NOT ${URANIUM_SCRIPTS_DIR} STREQUAL "")
# Extract Strings
add_custom_target(extract-messages ${URANIUM_SCRIPTS_DIR}/extract-messages ${CMAKE_SOURCE_DIR} cura)
@ -27,6 +27,12 @@ if(${URANIUM_SCRIPTS_DIR})
set(languages
en
x-test
ru
fr
de
it
es
fi
)
foreach(lang ${languages})
file(GLOB po_files resources/i18n/${lang}/*.po)
@ -55,7 +61,6 @@ find_package(PythonInterp 3.4.0 REQUIRED)
set(PYTHON_SITE_PACKAGES_DIR ${CMAKE_INSTALL_LIBDIR}/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/site-packages CACHE PATH "Install location of Python package")
install(DIRECTORY resources DESTINATION ${CMAKE_INSTALL_DATADIR}/cura)
install(DIRECTORY plugins DESTINATION ${CMAKE_INSTALL_LIBDIR}/cura)
file(GLOB cura_SRCS cura/*)
install(FILES ${cura_SRCS} DESTINATION ${PYTHON_SITE_PACKAGES_DIR}/cura)
install(DIRECTORY cura DESTINATION ${PYTHON_SITE_PACKAGES_DIR})
install(FILES cura_app.py DESTINATION ${CMAKE_INSTALL_BINDIR})

15
cura/CuraActions.py Normal file
View File

@ -0,0 +1,15 @@
from PyQt5.QtCore import QObject, pyqtSignal, pyqtSlot, pyqtProperty
import webbrowser
class CuraActions(QObject):
def __init__(self, parent = None):
super().__init__(parent)
@pyqtSlot()
def openDocumentation(self):
webbrowser.open("http://ultimaker.com/en/support/software")
@pyqtSlot()
def openBugReportPage(self):
webbrowser.open("http://github.com/Ultimaker/Cura/issues")

View File

@ -33,6 +33,7 @@ from . import PlatformPhysics
from . import BuildVolume
from . import CameraAnimation
from . import PrintInformation
from . import CuraActions
from PyQt5.QtCore import pyqtSlot, QUrl, Qt, pyqtSignal, pyqtProperty
from PyQt5.QtGui import QColor
@ -67,6 +68,7 @@ class CuraApplication(QtApplication):
self._output_devices = {}
self._print_information = None
self._i18n_catalog = None
self._previous_active_tool = None
self.activeMachineChanged.connect(self._onActiveMachineChanged)
@ -184,18 +186,27 @@ class CuraApplication(QtApplication):
engine.rootContext().setContextProperty("Printer", self)
self._print_information = PrintInformation.PrintInformation()
engine.rootContext().setContextProperty("PrintInformation", self._print_information)
self._cura_actions = CuraActions.CuraActions(self)
engine.rootContext().setContextProperty("CuraActions", self._cura_actions)
def onSelectionChanged(self):
if Selection.hasSelection():
if not self.getController().getActiveTool():
self.getController().setActiveTool("TranslateTool")
if self._previous_active_tool:
self.getController().setActiveTool(self._previous_active_tool)
self._previous_active_tool = None
else:
self.getController().setActiveTool("TranslateTool")
self._camera_animation.setStart(self.getController().getTool("CameraTool").getOrigin())
self._camera_animation.setTarget(Selection.getSelectedObject(0).getWorldPosition())
self._camera_animation.start()
else:
if self.getController().getActiveTool():
self._previous_active_tool = self.getController().getActiveTool().getPluginId()
self.getController().setActiveTool(None)
else:
self._previous_active_tool = None
requestAddPrinter = pyqtSignal()
@ -418,7 +429,7 @@ class CuraApplication(QtApplication):
self.addOutputDevice(drive, {
"id": drive,
"function": self._writeToSD,
"description": self._i18n_catalog.i18nc("Save button tooltip. {0} is sd card name", "Save to SD Card {0}".format(drive)),
"description": self._i18n_catalog.i18nc("Save button tooltip. {0} is sd card name", "Save to SD Card {0}").format(drive),
"icon": "save_sd",
"priority": 1
})
@ -471,7 +482,7 @@ class CuraApplication(QtApplication):
"eject",
self._i18n_catalog.i18nc("Message action", "Eject"),
"eject",
self._i18n_catalog.i18nc("Message action tooltip, {0} is sdcard", "Eject SD Card {0}".format(job._sdcard))
self._i18n_catalog.i18nc("Message action tooltip, {0} is sdcard", "Eject SD Card {0}").format(job._sdcard)
)
message._sdcard = job._sdcard
message.actionTriggered.connect(self._onMessageActionTriggered)

View File

@ -19,8 +19,7 @@ from PyQt5.QtQuick import QQuickView
from PyQt5.QtCore import QUrl, QObject, pyqtSlot, pyqtProperty, pyqtSignal
from UM.i18n import i18nCatalog
i18n_catalog = i18nCatalog("uranium")
i18n_catalog = i18nCatalog("cura")
class USBPrinterManager(QObject, SignalEmitter, Extension):
def __init__(self, parent = None):
@ -41,7 +40,7 @@ class USBPrinterManager(QObject, SignalEmitter, Extension):
## Add menu item to top menu of the application.
self.setMenuName("Firmware")
self.addMenuItem(i18n_catalog.i18n("Update"), self.updateAllFirmware)
self.addMenuItem(i18n_catalog.i18n("Update Firmware"), self.updateAllFirmware)
pyqtError = pyqtSignal(str, arguments = ["amount"])
processingProgress = pyqtSignal(float, arguments = ["amount"])

91
resources/i18n/ru/cura.po Normal file
View File

@ -0,0 +1,91 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-05-07 16:35+0200\n"
"PO-Revision-Date: 2015-06-01 18:29+0300\n"
"Language: ru\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
"Last-Translator: \n"
"Language-Team: \n"
"X-Generator: Poedit 1.8.1\n"
#: /home/ahiemstra/Projects/Ultimaker/cura/src/CuraApplication.py:91
msgctxt "Save button tooltip"
msgid "Save to Disk"
msgstr "Сохранить на диск"
#: /home/ahiemstra/Projects/Ultimaker/cura/src/CuraApplication.py:96
msgctxt "Splash screen message"
msgid "Setting up scene..."
msgstr "Настройка сцены ..."
#: /home/ahiemstra/Projects/Ultimaker/cura/src/CuraApplication.py:130
msgctxt "Splash screen message"
msgid "Loading interface..."
msgstr "Загрузка интерфейса ..."
#: /home/ahiemstra/Projects/Ultimaker/cura/src/CuraApplication.py:373
#, python-brace-format
msgctxt "Save button tooltip. {0} is sd card name"
msgid "Save to SD Card {0}"
msgstr "Сохранить на SD карту {0}"
#: /home/ahiemstra/Projects/Ultimaker/cura/src/CuraApplication.py:421
#, python-brace-format
msgctxt "Saved to SD message, {0} is sdcard, {1} is filename"
msgid "Saved to SD Card {0} as {1}"
msgstr "Сохранено на SD карту {0} как {1}"
#: /home/ahiemstra/Projects/Ultimaker/cura/src/CuraApplication.py:424
msgctxt "Message action"
msgid "Eject"
msgstr "Извлечь"
#: /home/ahiemstra/Projects/Ultimaker/cura/src/CuraApplication.py:426
#, python-brace-format
msgctxt "Message action tooltip, {0} is sdcard"
msgid "Eject SD Card {0}"
msgstr "Извлечь SD карту {0}"
#: /home/ahiemstra/Projects/Ultimaker/cura/plugins/CuraEngineBackend/__init__.py:13
msgctxt "CuraEngine backend plugin description"
msgid "Provides the link to the CuraEngine slicing backend"
msgstr "Обеспечивает связь с Кура слайсинг сервером"
#: /home/ahiemstra/Projects/Ultimaker/cura/plugins/USBPrinting/USBPrinterManager.py:40
msgid "Update Firmware"
msgstr "Обновление прошивки"
#: /home/ahiemstra/Projects/Ultimaker/cura/plugins/USBPrinting/__init__.py:13
msgctxt "USB Printing plugin description"
msgid "Accepts G-Code and sends them to a printer. Plugin can also update firmware"
msgstr "Принимает G-коды и отправляет их на принтер. Плагин также может обновить прошивку."
#: /home/ahiemstra/Projects/Ultimaker/cura/plugins/GCodeWriter/__init__.py:13
msgctxt "GCode Writer Plugin Description"
msgid "Writes GCode to a file"
msgstr "Записывает G-код в файл "
#: /home/ahiemstra/Projects/Ultimaker/cura/plugins/GCodeWriter/__init__.py:18
msgctxt "GCode Writer File Description"
msgid "GCode File"
msgstr "G-код"
#: /home/ahiemstra/Projects/Ultimaker/cura/plugins/LayerView/__init__.py:13
msgctxt "Layer View plugin description"
msgid "Provides the Layer view."
msgstr "Обеспечивает просмотр слоев."
#: /home/ahiemstra/Projects/Ultimaker/cura/plugins/LayerView/__init__.py:16
msgctxt "Layers View mode"
msgid "Layers"
msgstr "Слой"

View File

@ -0,0 +1,430 @@
msgid ""
msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Qt-Contexts: true\n"
"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
"Project-Id-Version: Cura\n"
"POT-Creation-Date: \n"
"PO-Revision-Date: \n"
"Last-Translator: \n"
"Language-Team: \n"
"Language: ru\n"
"X-Generator: Poedit 1.8.1\n"
#. About dialog title
#: ../resources/qml/AboutDialog.qml:12
msgctxt "AboutDialog|"
msgid "About Cura"
msgstr "О Кура"
#. About dialog application description
#: ../resources/qml/AboutDialog.qml:42
msgctxt "AboutDialog|"
msgid "End-to-end solution for fused filament 3D printing."
msgstr "Комплексное решение для 3D печати по технологии послойного накладывание пластика."
#. About dialog application author note
#: ../resources/qml/AboutDialog.qml:47
msgctxt "AboutDialog|"
msgid "Cura has been developed by Ultimaker B.V. in cooperation with the community."
msgstr "Кура была разработана компании Ultimaker BV в сотрудничестве с сообществом."
#. Close about dialog button
#: ../resources/qml/AboutDialog.qml:58
msgctxt "AboutDialog|"
msgid "Close"
msgstr "Закрыть окно"
#. Undo action
#: ../resources/qml/Actions.qml:37
msgctxt "Actions|"
msgid "&Undo"
msgstr "&Отмена"
#. Redo action
#: ../resources/qml/Actions.qml:45
msgctxt "Actions|"
msgid "&Redo"
msgstr "&Повтор"
#. Quit action
#: ../resources/qml/Actions.qml:53
msgctxt "Actions|"
msgid "&Quit"
msgstr "&Выход"
#. Preferences action
#: ../resources/qml/Actions.qml:61
msgctxt "Actions|"
msgid "&Preferences..."
msgstr "&Настройки программы..."
#. Add Printer action
#: ../resources/qml/Actions.qml:68
msgctxt "Actions|"
msgid "&Add Printer..."
msgstr "&Добавит новый принтер"
#. Configure Printers action
#: ../resources/qml/Actions.qml:74
msgctxt "Actions|"
msgid "&Configure Printers"
msgstr "&Настройки принтера"
#. Show Online Documentation action
#: ../resources/qml/Actions.qml:81
msgctxt "Actions|"
msgid "Show Online &Documentation"
msgstr "Показать онлайн &справку"
#. Report a Bug Action
#: ../resources/qml/Actions.qml:89
msgctxt "Actions|"
msgid "Report a &Bug"
msgstr "Сообщить о &проблеме"
#. About action
#: ../resources/qml/Actions.qml:96
msgctxt "Actions|"
msgid "&About..."
msgstr "&О Кура"
#. Delete selection action
#: ../resources/qml/Actions.qml:103
msgctxt "Actions|"
msgid "Delete Selection"
msgstr "Удалить выбранное"
#. Delete object action
#: ../resources/qml/Actions.qml:111
msgctxt "Actions|"
msgid "Delete Object"
msgstr "Удалить объект"
#. Center object action
#: ../resources/qml/Actions.qml:118
msgctxt "Actions|"
msgid "Center Object on Platform"
msgstr "Расположить объект по центру"
#. Duplicate object action
#: ../resources/qml/Actions.qml:124
msgctxt "Actions|"
msgid "Duplicate Object"
msgstr "Умножить объект"
#. Split object action
#: ../resources/qml/Actions.qml:130
msgctxt "Actions|"
msgid "Split Object into Parts"
msgstr "Разбить объект на частей"
#. Clear build platform action
#: ../resources/qml/Actions.qml:137
msgctxt "Actions|"
msgid "Clear Build Platform"
msgstr "Очистить печатающую платформу"
#. Reload all objects action
#: ../resources/qml/Actions.qml:144
msgctxt "Actions|"
msgid "Reload All Objects"
msgstr "Перезагрузить все объекты"
#. Reset all positions action
#: ../resources/qml/Actions.qml:150
msgctxt "Actions|"
msgid "Reset All Object Positions"
msgstr "Сбросить все позиции объектов"
#. Reset all positions action
#: ../resources/qml/Actions.qml:156
msgctxt "Actions|"
msgid "Reset All Object Transformations"
msgstr "Сбросить все преобразования объектов"
#. Open file action
#: ../resources/qml/Actions.qml:162
msgctxt "Actions|"
msgid "&Open..."
msgstr "&Открыть..."
#. Save file action
#: ../resources/qml/Actions.qml:170
msgctxt "Actions|"
msgid "&Save..."
msgstr "&Сохранить..."
#. Show engine log action
#: ../resources/qml/Actions.qml:178
msgctxt "Actions|"
msgid "Show engine &log..."
msgstr "Показать журнал &слайсера"
#. Add Printer dialog title
#. ----------
#. Add Printer wizard page title
#: ../resources/qml/AddMachineWizard.qml:12
#: ../resources/qml/AddMachineWizard.qml:19
msgctxt "AddMachineWizard|"
msgid "Add Printer"
msgstr "Добавить новый принтер"
#. Add Printer wizard page description
#: ../resources/qml/AddMachineWizard.qml:25
msgctxt "AddMachineWizard|"
msgid "Please select the type of printer:"
msgstr "Выберите тип принтера:"
#. Add Printer wizard field label
#: ../resources/qml/AddMachineWizard.qml:40
msgctxt "AddMachineWizard|"
msgid "Printer Name:"
msgstr "Название принтера:"
#. Add Printer wizarad button
#: ../resources/qml/AddMachineWizard.qml:53
msgctxt "AddMachineWizard|"
msgid "Next"
msgstr "Дальше"
#. Add Printer wizarad button
#: ../resources/qml/AddMachineWizard.qml:63
msgctxt "AddMachineWizard|"
msgid "Cancel"
msgstr "Отменить"
#. USB Printing dialog label, %1 is head temperature
#: ../plugins/USBPrinting/ControlWindow.qml:15
#, qt-format
msgctxt "ControlWindow|"
msgid "Extruder Temperature %1"
msgstr "Температура экструдера %1"
#. USB Printing dialog label, %1 is bed temperature
#: ../plugins/USBPrinting/ControlWindow.qml:20
#, qt-format
msgctxt "ControlWindow|"
msgid "Bed Temperature %1"
msgstr "Температура платформы %1"
#. USB Printing dialog start print button
#: ../plugins/USBPrinting/ControlWindow.qml:33
msgctxt "ControlWindow|"
msgid "Print"
msgstr "Печать"
#. USB Printing dialog cancel print button
#: ../plugins/USBPrinting/ControlWindow.qml:40
msgctxt "ControlWindow|"
msgid "Cancel"
msgstr "Отменить"
#. Cura application window title
#: ../resources/qml/Cura.qml:14
msgctxt "Cura|"
msgid "Cura"
msgstr "Кура"
#. File menu
#: ../resources/qml/Cura.qml:26
msgctxt "Cura|"
msgid "&File"
msgstr "&Файл"
#. Edit menu
#: ../resources/qml/Cura.qml:38
msgctxt "Cura|"
msgid "&Edit"
msgstr "&Изменить"
#. Machine menu
#: ../resources/qml/Cura.qml:50
msgctxt "Cura|"
msgid "&Machine"
msgstr "&Принтер"
#. Extensions menu
#: ../resources/qml/Cura.qml:76
msgctxt "Cura|"
msgid "E&xtensions"
msgstr "&Расширения"
#. Settings menu
#: ../resources/qml/Cura.qml:107
msgctxt "Cura|"
msgid "&Settings"
msgstr "&Настройки"
#. Help menu
#: ../resources/qml/Cura.qml:114
msgctxt "Cura|"
msgid "&Help"
msgstr "&Помощь"
#. View Mode toolbar button
#: ../resources/qml/Cura.qml:231
msgctxt "Cura|"
msgid "View Mode"
msgstr "Режим просмотра"
#. View preferences page title
#: ../resources/qml/Cura.qml:273
msgctxt "Cura|"
msgid "View"
msgstr "Просмотр"
#. File open dialog title
#: ../resources/qml/Cura.qml:370
msgctxt "Cura|"
msgid "Open File"
msgstr "Открыть файл"
#. File save dialog title
#: ../resources/qml/Cura.qml:386
msgctxt "Cura|"
msgid "Save File"
msgstr "Сохранить файл"
#. Engine Log dialog title
#: ../resources/qml/EngineLog.qml:11
msgctxt "EngineLog|"
msgid "Engine Log"
msgstr "Журнал слайсера"
#. Close engine log button
#: ../resources/qml/EngineLog.qml:30
msgctxt "EngineLog|"
msgid "Close"
msgstr "Закрыть"
#. Firmware update status label
#: ../plugins/USBPrinting/FirmwareUpdateWindow.qml:16
msgctxt "FirmwareUpdateWindow|"
msgid "Starting firmware update, this may take a while."
msgstr "Начинается обновление прошивки, это может занять некоторое время."
#. Firmware update status label
#: ../plugins/USBPrinting/FirmwareUpdateWindow.qml:21
msgctxt "FirmwareUpdateWindow|"
msgid "Firmware update completed."
msgstr "Обновление прошивки завершено."
#. Firmware update status label
#: ../plugins/USBPrinting/FirmwareUpdateWindow.qml:26
msgctxt "FirmwareUpdateWindow|"
msgid "Updating firmware."
msgstr "Обновление прошивки."
#. Print material amount save button label
#: ../resources/qml/SaveButton.qml:149
#, qt-format
msgctxt "SaveButton|"
msgid "%1m material"
msgstr "%1m материал"
#. Save button label
#: ../resources/qml/SaveButton.qml:191
msgctxt "SaveButton|"
msgid "Please load a 3D model"
msgstr "Пожалуйста, загрузите 3D модель"
#. Save button label
#: ../resources/qml/SaveButton.qml:194
msgctxt "SaveButton|"
msgid "Calculating Print-time"
msgstr "Вычисляется время печати"
#. Save button label
#: ../resources/qml/SaveButton.qml:197
msgctxt "SaveButton|"
msgid "Estimated Print-time"
msgstr "Расчетное время печати"
#. Simple configuration mode option
#: ../resources/qml/Sidebar.qml:105
msgctxt "Sidebar|"
msgid "Simple"
msgstr "Простой"
#. Advanced configuration mode option
#: ../resources/qml/Sidebar.qml:107
msgctxt "Sidebar|"
msgid "Advanced"
msgstr "Продвинутый"
#. Configuration mode label
#: ../resources/qml/SidebarHeader.qml:26
msgctxt "SidebarHeader|"
msgid "Mode:"
msgstr "Режим:"
#. Machine selection label
#: ../resources/qml/SidebarHeader.qml:70
msgctxt "SidebarHeader|"
msgid "Machine:"
msgstr "Принтер:"
#. Sidebar header label
#: ../resources/qml/SidebarHeader.qml:117
msgctxt "SidebarHeader|"
msgid "Print Setup"
msgstr "Настройка Печати"
#. Sidebar configuration label
#: ../resources/qml/SidebarSimple.qml:40
msgctxt "SidebarSimple|"
msgid "No Model Loaded"
msgstr "Модель не загружена"
#. Sidebar configuration label
#: ../resources/qml/SidebarSimple.qml:45
msgctxt "SidebarSimple|"
msgid "Calculating..."
msgstr "Высчитывается..."
#. Sidebar configuration label
#: ../resources/qml/SidebarSimple.qml:50
msgctxt "SidebarSimple|"
msgid "Estimated Print Time"
msgstr "Расчетное время печати"
#. Quality slider label
#: ../resources/qml/SidebarSimple.qml:87
msgctxt "SidebarSimple|"
msgid ""
"Minimum\n"
"Draft"
msgstr ""
"Минимальная \n"
"тяга"
#. Quality slider label
#: ../resources/qml/SidebarSimple.qml:97
msgctxt "SidebarSimple|"
msgid ""
"Maximum\n"
"Quality"
msgstr ""
"Максимальное\n"
"Качество"
#. Setting checkbox
#: ../resources/qml/SidebarSimple.qml:109
msgctxt "SidebarSimple|"
msgid "Enable Support"
msgstr "Включить Поддержку"
#. View configuration page title
#: ../resources/qml/ViewPage.qml:9
msgctxt "ViewPage|"
msgid "View"
msgstr "Просмотр"
#. Display Overhang preference checkbox
#: ../resources/qml/ViewPage.qml:24
msgctxt "ViewPage|"
msgid "Display Overhang"
msgstr "Показать где есть нависающие части"

File diff suppressed because it is too large Load Diff

View File

@ -337,8 +337,8 @@ UM.MainWindow {
preferences.onTriggered: preferences.visible = true;
configureMachines.onTriggered: { preferences.visible = true; preferences.setPage(2); }
documentation.onTriggered: Qt.openUrlExternally("https://ultimaker.com/en/support");
reportBug.onTriggered: Qt.openUrlExternally("https://github.com/Ultimaker/Cura/issues");
documentation.onTriggered: CuraActions.openDocumentation();
reportBug.onTriggered: CuraActions.openBugReportPage();
showEngineLog.onTriggered: engineLog.visible = true;
about.onTriggered: aboutDialog.visible = true;
}

View File

@ -111,4 +111,11 @@ UM.AngledCornerRectangle {
//: Advanced configuration mode option
ListElement { text: QT_TR_NOOP("Advanced"); file: "SidebarAdvanced.qml" }
}
Component.onCompleted: {
for(var i = 0; i < modesListModel.count; ++i)
{
modesListModel.setProperty(i, "text", qsTr(modesListModel.get(i).text));
}
}
}

View File

@ -33,7 +33,7 @@ Column {
}
ToolButton {
text: base.modesModel ? qsTr(base.modesModel.get(modeMenu.currentIndex).text) : "";
text: base.modesModel ? base.modesModel.get(modeMenu.currentIndex).text : "";
style: UM.Theme.styles.sidebar_header_button;
@ -48,7 +48,7 @@ Column {
model: base.modesModel;
MenuItem {
text: qsTr(model.text);
text: model.text;
checkable: true;
checked: modeMenu.currentIndex == index;
exclusiveGroup: modeMenuGroup;

View File

@ -155,45 +155,37 @@ QtObject {
property Component progressbar: Component{
ProgressBarStyle {
background: UM.AngledCornerRectangle {
anchors.fill: parent
anchors.left: parent.left
cornerSize: UM.Theme.sizes.progressbar_control.height
implicitWidth: UM.Theme.sizes.progressbar.width
implicitHeight: UM.Theme.sizes.progressbar.height
color: "transparent"
color: UM.Theme.colors.progressbar_background
}
progress: UM.AngledCornerRectangle {
anchors.left: parent.left
anchors.fill: parent
cornerSize: UM.Theme.sizes.progressbar_control.height
color: UM.Theme.colors.progressbar_background
Item {
anchors.fill: parent
anchors.margins: UM.Theme.sizes.progressbar_margin.width
color: control.indeterminate ? "transparent" : UM.Theme.colors.progressbar_control
UM.AngledCornerRectangle {
cornerSize: UM.Theme.sizes.progressbar_control.height
color: UM.Theme.colors.progressbar_control
width: UM.Theme.sizes.progressbar_control.width
height: UM.Theme.sizes.progressbar_control.height
visible: control.indeterminate
Row {
Repeater {
UM.AngledCornerRectangle {
cornerSize: UM.Theme.sizes.progressbar_control.height
color: UM.Theme.colors.progressbar_control
width: UM.Theme.sizes.progressbar_control.width
height: UM.Theme.sizes.progressbar_control.height
}
model: 1
}
SequentialAnimation on x {
id: xAnim
property int animEndPoint: UM.Theme.sizes.progressbar.width - UM.Theme.sizes.progressbar_control.width
running: control.indeterminate
loops: Animation.Infinite
NumberAnimation { from: 0; to: xAnim.animEndPoint; duration: 2000;}
NumberAnimation { from: xAnim.animEndPoint; to: 0; duration: 2000;}
}
SequentialAnimation on x {
id: xAnim
property int animEndPoint: UM.Theme.sizes.progressbar.width - UM.Theme.sizes.progressbar_control.width
running: control.indeterminate
loops: Animation.Infinite
NumberAnimation { from: 0; to: xAnim.animEndPoint; duration: 2000;}
NumberAnimation { from: xAnim.animEndPoint; to: 0; duration: 2000;}
}
}
}
}
}
property Component sidebar_category: Component {
ButtonStyle {
background: UM.AngledCornerRectangle {