mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-11 16:09:01 +08:00
The welcome dialog is now a rectangle instead of a dialog
The whole window approach was just causing to much cross platform issues, so I converted it into a rectangle and put a mouseArea that eats all the events in the greyOut background CURA-6057
This commit is contained in:
parent
28dc187731
commit
894a09b654
@ -42,12 +42,6 @@ UM.MainWindow
|
|||||||
tooltip.hide();
|
tooltip.hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
WelcomeDialog
|
|
||||||
{
|
|
||||||
id: welcomeDialog
|
|
||||||
visible: true // True, so if somehow no preferences are found/loaded, it's shown anyway.
|
|
||||||
}
|
|
||||||
|
|
||||||
Rectangle
|
Rectangle
|
||||||
{
|
{
|
||||||
id: greyOutBackground
|
id: greyOutBackground
|
||||||
@ -56,6 +50,22 @@ UM.MainWindow
|
|||||||
color: UM.Theme.getColor("window_disabled_background")
|
color: UM.Theme.getColor("window_disabled_background")
|
||||||
opacity: 0.7
|
opacity: 0.7
|
||||||
z: stageMenu.z + 1
|
z: stageMenu.z + 1
|
||||||
|
|
||||||
|
MouseArea
|
||||||
|
{
|
||||||
|
// Prevent all mouse events from passing through.
|
||||||
|
enabled: parent.visible
|
||||||
|
anchors.fill: parent
|
||||||
|
hoverEnabled: true
|
||||||
|
acceptedButtons: Qt.LeftButton | Qt.RightButton
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
WelcomeDialog
|
||||||
|
{
|
||||||
|
id: welcomeDialog
|
||||||
|
visible: true // True, so if somehow no preferences are found/loaded, it's shown anyway.
|
||||||
|
z: greyOutBackground.z + 1
|
||||||
}
|
}
|
||||||
|
|
||||||
Component.onCompleted:
|
Component.onCompleted:
|
||||||
|
@ -13,18 +13,16 @@ import Cura 1.1 as Cura
|
|||||||
//
|
//
|
||||||
// This is a no-frame dialog that shows the welcome process.
|
// This is a no-frame dialog that shows the welcome process.
|
||||||
//
|
//
|
||||||
Window
|
Item
|
||||||
{
|
{
|
||||||
UM.I18nCatalog { id: catalog; name: "cura" }
|
UM.I18nCatalog { id: catalog; name: "cura" }
|
||||||
|
|
||||||
id: dialog
|
id: dialog
|
||||||
title: catalog.i18nc("@title", "Welcome to Ultimaker Cura")
|
|
||||||
modality: Qt.ApplicationModal
|
anchors.centerIn: parent
|
||||||
flags: Qt.Dialog | Qt.FramelessWindowHint
|
|
||||||
|
|
||||||
width: 580 * screenScaleFactor
|
width: 580 * screenScaleFactor
|
||||||
height: 600 * screenScaleFactor
|
height: 600 * screenScaleFactor
|
||||||
color: "transparent"
|
|
||||||
|
|
||||||
property int shadowOffset: 1 * screenScaleFactor
|
property int shadowOffset: 1 * screenScaleFactor
|
||||||
|
|
||||||
|
@ -25,6 +25,8 @@ Item
|
|||||||
property var progressValue: model == null ? 0 : model.currentProgress
|
property var progressValue: model == null ? 0 : model.currentProgress
|
||||||
property string pageUrl: currentItem == null ? "" : currentItem.page_url
|
property string pageUrl: currentItem == null ? "" : currentItem.page_url
|
||||||
|
|
||||||
|
property alias backgroundColor: panelBackground.color
|
||||||
|
|
||||||
signal showNextPage()
|
signal showNextPage()
|
||||||
signal showPreviousPage()
|
signal showPreviousPage()
|
||||||
signal goToPage(string page_id) // Go to a specific page by the given page_id.
|
signal goToPage(string page_id) // Go to a specific page by the given page_id.
|
||||||
@ -41,7 +43,7 @@ Item
|
|||||||
id: panelBackground
|
id: panelBackground
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
radius: UM.Theme.getSize("default_radius").width
|
radius: UM.Theme.getSize("default_radius").width
|
||||||
|
color: UM.Theme.getColor("main_background")
|
||||||
Cura.ProgressBar
|
Cura.ProgressBar
|
||||||
{
|
{
|
||||||
id: progressBar
|
id: progressBar
|
||||||
|
Loading…
x
Reference in New Issue
Block a user