Skip to content

Commit

Permalink
Show build-version in header if 'alternate version' enabled.
Browse files Browse the repository at this point in the history
  • Loading branch information
rburema committed Jun 13, 2022
1 parent d1374c7 commit 04ba720
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cura/CuraApplication.py
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,10 @@ def ultimakerCloudAccountRootUrl(self) -> str:
def ultimakerDigitalFactoryUrl(self) -> str:
return UltimakerCloudConstants.CuraDigitalFactoryURL

@pyqtProperty(str, constant = True)
def extraVersionText(self) -> str:
return ApplicationMetadata.CuraBuildType if ApplicationMetadata.IsAlternateVersion else ""

def addCommandLineOptions(self):
"""Adds command line options to the command line parser.
Expand Down
11 changes: 11 additions & 0 deletions resources/qml/MainWindow/MainWindowHeader.qml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,17 @@ Item
sourceSize.width: width
sourceSize.height: height
}

UM.Label
{
id: extra_version_label
anchors.left: logo.right
anchors.leftMargin: UM.Theme.getSize("default_margin").width
anchors.verticalCenter: parent.verticalCenter

text: "BUILD: " + CuraApplication.extraVersionText
}

ButtonGroup
{
buttons: stagesListContainer.children
Expand Down

0 comments on commit 04ba720

Please sign in to comment.