Commit 106977ef authored by Arjen Hiemstra's avatar Arjen Hiemstra
Browse files

sketch: Add tooltips to WelcomePage and MenuPanel

parent b86fdfa6
......@@ -56,6 +56,8 @@ Page {
width: Constants.GridWidth * 0.75;
height: Constants.GridHeight * 0.75;
tooltip: "Mininize";
image: Settings.theme.icon("minimize");
onClicked: Krita.Window.minimize();
},
......@@ -66,6 +68,8 @@ Page {
width: Constants.GridWidth * 0.75;
height: Constants.GridHeight * 0.75;
tooltip: "Close";
image: Settings.theme.icon("close");
onClicked: Krita.Window.close();
}
......
......@@ -32,6 +32,39 @@ Item {
height: Constants.GridHeight;
Rectangle {
anchors.bottom: parent.top;
anchors.bottomMargin: -8;
anchors.horizontalCenter: parent.horizontalCenter;
width: Constants.GridWidth * 1.5;
height: Constants.GridHeight / 2 + 8;
color: Settings.theme.color("panels/menu/base");
radius: 8;
Label {
text: "Menu";
anchors.centerIn: parent;
anchors.verticalCenterOffset: -4;
font: Settings.theme.font("panelHandle");
color: Settings.theme.color("panels/menu/text");
}
MouseArea {
id: mousearea1
anchors.fill: parent;
onClicked: base.collapsed = !base.collapsed;
}
SimpleTouchArea {
anchors.fill: parent;
onTouched: base.collapsed = !base.collapsed;
}
}
Rectangle {
id: background;
color: Settings.theme.color("panels/menu/base");
......@@ -55,24 +88,28 @@ Item {
id: newButton;
image: Settings.theme.icon("filenew")
highlightColor: Settings.theme.color("panels/menu/buttonHighlight");
tooltip: "New Image"
onClicked: base.buttonClicked( "new" );
}
Button {
id: openButton;
image: Settings.theme.icon("fileopen")
highlightColor: Settings.theme.color("panels/menu/buttonHighlight");
tooltip: "Open Image"
onClicked: base.buttonClicked( "open" );
}
Button {
id: saveButton;
image: Settings.theme.icon("filesave")
highlightColor: Settings.theme.color("panels/menu/buttonHighlight");
tooltip: "Save Image"
onClicked: base.buttonClicked( "save" );
}
Button {
id: saveAsButton;
image: Settings.theme.icon("filesaveas")
highlightColor: Settings.theme.color("panels/menu/buttonHighlight");
tooltip: "Save Image As..."
onClicked: base.buttonClicked( "saveAs" );
}
}
......@@ -85,6 +122,7 @@ Item {
image: Settings.theme.icon("undo")
highlightColor: Settings.theme.color("panels/menu/buttonHighlight");
enabled: sketchView.canUndo;
tooltip: "Undo"
onClicked: base.buttonClicked( "undo" );
}
Button {
......@@ -92,18 +130,21 @@ Item {
image: Settings.theme.icon("redo")
highlightColor: Settings.theme.color("panels/menu/buttonHighlight");
enabled: sketchView.canRedo;
tooltip: "Redo"
onClicked: base.buttonClicked( "redo" );
}
Button {
id: zoomOutButton;
image: Settings.theme.icon("delete")
highlightColor: Settings.theme.color("panels/menu/buttonHighlight");
tooltip: "Zoom Out"
onClicked: base.buttonClicked( "zoomOut" );
}
Button {
id: zoomInButton;
image: Settings.theme.icon("add")
highlightColor: Settings.theme.color("panels/menu/buttonHighlight");
tooltip: "Zoom In"
onClicked: base.buttonClicked( "zoomIn" );
}
Item {
......@@ -117,6 +158,7 @@ Item {
enabled: (typeof switchToDesktopAction === "undefined") ? false : switchToDesktopAction.enabled;
image: Settings.theme.icon("switch")
highlightColor: Settings.theme.color("panels/menu/buttonHighlight");
tooltip: "Switch to Desktop Mode"
onClicked: {
base.buttonClicked( "switchToDesktop" );
base.collapsed = !base.collapsed;
......@@ -126,6 +168,7 @@ Item {
id: minimizeButton;
image: Settings.theme.icon("minimize")
highlightColor: Settings.theme.color("panels/menu/buttonHighlight");
tooltip: "Minimize"
onClicked: {
base.buttonClicked( "minimize" );
base.collapsed = !base.collapsed;
......@@ -135,6 +178,7 @@ Item {
id: closeButton;
image: Settings.theme.icon("close")
highlightColor: Settings.theme.color("panels/menu/buttonHighlight");
tooltip: "Close"
onClicked: base.buttonClicked( "close" );
}
/*Item {
......@@ -164,39 +208,6 @@ Item {
}
}
Rectangle {
anchors.bottom: parent.top;
anchors.bottomMargin: -8;
anchors.horizontalCenter: parent.horizontalCenter;
width: Constants.GridWidth * 1.5;
height: Constants.GridHeight / 2 + 8;
color: Settings.theme.color("panels/menu/base");
radius: 8;
Label {
text: "Menu";
anchors.centerIn: parent;
anchors.verticalCenterOffset: -4;
font: Settings.theme.font("panelHandle");
color: Settings.theme.color("panels/menu/text");
}
MouseArea {
id: mousearea1
anchors.fill: parent;
onClicked: base.collapsed = !base.collapsed;
}
SimpleTouchArea {
anchors.fill: parent;
onTouched: base.collapsed = !base.collapsed;
}
}
states: State {
name: "collapsed";
when: base.collapsed;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment