Skip to content

Commit

Permalink
Minor improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
emericg committed Nov 21, 2024
1 parent 817b782 commit d8758b8
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 9 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ qt_add_translations(${CMAKE_PROJECT_NAME}

################################################################################

# Qt librariries
# Qt libraries
target_link_libraries(${CMAKE_PROJECT_NAME} PRIVATE
Qt6::Core
Qt6::Gui
Expand Down
6 changes: 3 additions & 3 deletions qml/PageSelectors.qml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ Flickable {
anchors.leftMargin: singleColumn ? 0 : Theme.componentMargin
anchors.rightMargin: singleColumn ? 0 : Theme.componentMargin

text: qsTr("Selectors")
text: qsTr("SelectorMenu")
source: ""
}

Expand Down Expand Up @@ -102,7 +102,7 @@ Flickable {
anchors.leftMargin: singleColumn ? 0 : Theme.componentMargin
anchors.rightMargin: singleColumn ? 0 : Theme.componentMargin

text: qsTr("Selectors")
text: qsTr("SelectorMenuSunken")
source: ""
}

Expand Down Expand Up @@ -154,7 +154,7 @@ Flickable {
anchors.leftMargin: singleColumn ? 0 : Theme.componentMargin
anchors.rightMargin: singleColumn ? 0 : Theme.componentMargin

text: qsTr("Selectors")
text: qsTr("SelectorMenuColorful")
source: ""
}

Expand Down
3 changes: 1 addition & 2 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,10 @@ int main(int argc, char *argv[])

// Then we start the UI
QQmlApplicationEngine engine;
QQmlContext *engine_context = engine.rootContext();

engine.addImportPath(":/qt/qml/QmlAppTemplate");
engine.addImportPath(":/qt/qml/ComponentLibrary");

QQmlContext *engine_context = engine.rootContext();
engine_context->setContextProperty("settingsManager", sm);
engine_context->setContextProperty("utilsApp", utilsApp);
engine_context->setContextProperty("utilsLanguage", utilsLanguage);
Expand Down
2 changes: 1 addition & 1 deletion thirdparty/ComponentLibrary/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ if (TARGET Qt::Location)
maps/MapScale.qml
)
else()
message(NOTICE "Skipping the mapping components from ComponentLibrairy as Qt6::Location is not used.")
message(NOTICE "Skipping the mapping components from ComponentLibrary as Qt6::Location is not used.")
endif()

list(APPEND MODULE_QML_FILES
Expand Down
10 changes: 8 additions & 2 deletions thirdparty/ComponentLibrary/generic/SelectorMenuSunken.qml
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,23 @@ Item {

opacity: enabled ? 1 : 0.66

// colors
property color colorBackground: Theme.colorComponent
property color colorForeground: Theme.colorComponentBackground

// states
signal menuSelected(var index)
property int currentSelection: 1

// model
property var model: null

////////////////

Rectangle { // background
anchors.fill: parent
radius: Theme.componentRadius
color: Theme.colorComponent
color: control.colorBackground
}

////////////////
Expand All @@ -37,7 +43,7 @@ Item {
delegate: SelectorMenuItem {
colorContent: Theme.colorComponentText
colorContentHighlight: Theme.colorComponentText
colorBackgroundHighlight: Theme.colorComponentBackground
colorBackgroundHighlight: control.colorForeground
height: parent.height
highlighted: (control.currentSelection === idx)
index: idx ?? 0
Expand Down

0 comments on commit d8758b8

Please sign in to comment.