Initial commit.
This commit is contained in:
10
qml/Menu/ClideMenu.qml
Normal file
10
qml/Menu/ClideMenu.qml
Normal file
@@ -0,0 +1,10 @@
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
|
||||
Menu {
|
||||
background: Rectangle {
|
||||
color: "#3c3f41"
|
||||
implicitWidth: 200
|
||||
radius: 2
|
||||
}
|
||||
}
|
||||
138
qml/Menu/ClideMenuBar.qml
Normal file
138
qml/Menu/ClideMenuBar.qml
Normal file
@@ -0,0 +1,138 @@
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
|
||||
MenuBar {
|
||||
background: Rectangle {
|
||||
color: "#3b3e40" // Dark background like CLion
|
||||
}
|
||||
|
||||
Action {
|
||||
id: actionNewProject
|
||||
|
||||
text: qsTr("&New Project...")
|
||||
}
|
||||
Action {
|
||||
id: actionOpen
|
||||
|
||||
text: qsTr("&Open...")
|
||||
}
|
||||
Action {
|
||||
id: actionSave
|
||||
|
||||
text: qsTr("&Save")
|
||||
}
|
||||
Action {
|
||||
id: actionExit
|
||||
|
||||
text: qsTr("&Exit")
|
||||
onTriggered: Qt.quit()
|
||||
}
|
||||
ClideMenu {
|
||||
title: qsTr("&File")
|
||||
|
||||
ClideMenuBarItem {
|
||||
action: actionNewProject
|
||||
}
|
||||
ClideMenuBarItem {
|
||||
action: actionOpen
|
||||
}
|
||||
ClideMenuBarItem {
|
||||
action: actionSave
|
||||
}
|
||||
MenuSeparator {
|
||||
background: Rectangle {
|
||||
border.color: color
|
||||
color: "#3c3f41"
|
||||
implicitHeight: 3
|
||||
implicitWidth: 200
|
||||
}
|
||||
}
|
||||
ClideMenuBarItem {
|
||||
action: actionExit
|
||||
}
|
||||
}
|
||||
Action {
|
||||
id: actionUndo
|
||||
|
||||
text: qsTr("&Undo")
|
||||
}
|
||||
Action {
|
||||
id: actionRedo
|
||||
|
||||
text: qsTr("&Redo")
|
||||
}
|
||||
Action {
|
||||
id: actionCut
|
||||
|
||||
text: qsTr("&Cut")
|
||||
}
|
||||
Action {
|
||||
id: actionCopy
|
||||
|
||||
text: qsTr("&Copy")
|
||||
}
|
||||
Action {
|
||||
id: actionPaste
|
||||
|
||||
text: qsTr("&Paste")
|
||||
}
|
||||
ClideMenu {
|
||||
title: qsTr("&Edit")
|
||||
|
||||
ClideMenuBarItem {
|
||||
action: actionUndo
|
||||
}
|
||||
ClideMenuBarItem {
|
||||
action: actionRedo
|
||||
}
|
||||
ClideMenuBarItem {
|
||||
action: actionCut
|
||||
}
|
||||
ClideMenuBarItem {
|
||||
action: actionCopy
|
||||
}
|
||||
ClideMenuBarItem {
|
||||
action: actionPaste
|
||||
}
|
||||
}
|
||||
Action {
|
||||
id: actionToolWindows
|
||||
|
||||
text: qsTr("&Tool Windows")
|
||||
}
|
||||
Action {
|
||||
id: actionAppearance
|
||||
|
||||
text: qsTr("&Appearance")
|
||||
}
|
||||
ClideMenu {
|
||||
title: qsTr("&View")
|
||||
|
||||
ClideMenuBarItem {
|
||||
action: actionToolWindows
|
||||
}
|
||||
ClideMenuBarItem {
|
||||
action: actionAppearance
|
||||
}
|
||||
}
|
||||
Action {
|
||||
id: actionDocumentation
|
||||
|
||||
text: qsTr("&Documentation")
|
||||
}
|
||||
Action {
|
||||
id: actionAbout
|
||||
|
||||
text: qsTr("&About")
|
||||
}
|
||||
ClideMenu {
|
||||
title: qsTr("&Help")
|
||||
|
||||
ClideMenuBarItem {
|
||||
action: actionDocumentation
|
||||
}
|
||||
ClideMenuBarItem {
|
||||
action: actionAbout
|
||||
}
|
||||
}
|
||||
}
|
||||
16
qml/Menu/ClideMenuBarItem.qml
Normal file
16
qml/Menu/ClideMenuBarItem.qml
Normal file
@@ -0,0 +1,16 @@
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
|
||||
MenuItem {
|
||||
id: root
|
||||
|
||||
background: Rectangle {
|
||||
color: root.hovered ? "#4b4f51" : "#3c3f41" // Hover effect
|
||||
radius: 2.5
|
||||
}
|
||||
contentItem: IconLabel {
|
||||
color: "white"
|
||||
font.family: "Helvetica"
|
||||
text: root.text
|
||||
}
|
||||
}
|
||||
20
qml/main.qml
Normal file
20
qml/main.qml
Normal file
@@ -0,0 +1,20 @@
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
|
||||
import "Menu"
|
||||
|
||||
ApplicationWindow {
|
||||
height: 800
|
||||
title: "CLIDE"
|
||||
visible: true
|
||||
width: 1200
|
||||
|
||||
menuBar: ClideMenuBar {
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
anchors.fill: parent
|
||||
color: "#1e1f22" // Dark background
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user