Compare commits
4 commits
b56425c671
...
eef1903557
Author | SHA1 | Date | |
---|---|---|---|
![]() |
eef1903557 | ||
![]() |
0c6dd01aed | ||
![]() |
a4b7b42cfe | ||
![]() |
f04e6a5e0f |
5 changed files with 59 additions and 12 deletions
14
flake.nix
14
flake.nix
|
@ -32,6 +32,7 @@
|
||||||
"rustfmt"
|
"rustfmt"
|
||||||
])
|
])
|
||||||
rust-analyzer
|
rust-analyzer
|
||||||
|
qt6.wrapQtAppsHook
|
||||||
];
|
];
|
||||||
|
|
||||||
bi = with pkgs; [
|
bi = with pkgs; [
|
||||||
|
@ -43,7 +44,6 @@
|
||||||
cmake
|
cmake
|
||||||
kdePackages.extra-cmake-modules
|
kdePackages.extra-cmake-modules
|
||||||
pkg-config
|
pkg-config
|
||||||
qt6.wrapQtAppsHook
|
|
||||||
makeWrapper
|
makeWrapper
|
||||||
|
|
||||||
openssl.dev
|
openssl.dev
|
||||||
|
@ -56,7 +56,7 @@
|
||||||
# clang-format
|
# clang-format
|
||||||
qt6.full
|
qt6.full
|
||||||
qt6.qttools
|
qt6.qttools
|
||||||
qt6.qtbase
|
# qt6.qtbase
|
||||||
# qt6.qtquickcontrols2
|
# qt6.qtquickcontrols2
|
||||||
# qt6.qtx11extras
|
# qt6.qtx11extras
|
||||||
qt6.qtmultimedia
|
qt6.qtmultimedia
|
||||||
|
@ -106,8 +106,8 @@
|
||||||
CMAKE_C_COMPILER = "${pkgs.gcc}/bin/gcc";
|
CMAKE_C_COMPILER = "${pkgs.gcc}/bin/gcc";
|
||||||
CMAKE_CXX_COMPILER = "${pkgs.gcc}/bin/g++";
|
CMAKE_CXX_COMPILER = "${pkgs.gcc}/bin/g++";
|
||||||
CARGO_PROFILE_RELEASE_BUILD_OVERRIDE_DEBUG = true;
|
CARGO_PROFILE_RELEASE_BUILD_OVERRIDE_DEBUG = true;
|
||||||
# KDE_INCLUDEDIR = "${pkgs.kdePackages.kirigami.dev}/include";
|
# KDE_INCLUDEDIR = "${pkgs.kdePackages.kirigami}/include";
|
||||||
# KDE_QMLDIR = "${pkgs.kdePackages.kirigami.dev}/lib/qt-6/qml/org/kde/kirigami/";
|
# KDE_QMLDIR = "${pkgs.kdePackages.kirigami}/lib/qt-6/qml/";
|
||||||
|
|
||||||
# This creates the proper qt env so that plugins are found right.
|
# This creates the proper qt env so that plugins are found right.
|
||||||
shellHook = ''
|
shellHook = ''
|
||||||
|
@ -117,6 +117,12 @@
|
||||||
sed "/^exec/d" -i "$setQtEnvironment"
|
sed "/^exec/d" -i "$setQtEnvironment"
|
||||||
source "$setQtEnvironment"
|
source "$setQtEnvironment"
|
||||||
'';
|
'';
|
||||||
|
# shellHook = ''
|
||||||
|
# export CMAKE_PREFIX_PATH="${pkgs.qt6.full}/lib/cmake/Qt6:$CMAKE_PREFIX_PATH"
|
||||||
|
# bashdir=$(mktemp -d)
|
||||||
|
# makeWrapper "$(type -p bash)" "$bashdir/bash" "''${qtWrapperArgs[@]}"
|
||||||
|
# exec "$bashdir/bash"
|
||||||
|
# '';
|
||||||
DATABASE_URL =
|
DATABASE_URL =
|
||||||
"sqlite:///home/chris/.local/share/lumina/library-db.sqlite3";
|
"sqlite:///home/chris/.local/share/lumina/library-db.sqlite3";
|
||||||
};
|
};
|
||||||
|
|
24
smdview/blah/CMakeLists.txt
Normal file
24
smdview/blah/CMakeLists.txt
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
cmake_minimum_required(VERSION 3.28)
|
||||||
|
|
||||||
|
project(kirigami_rust)
|
||||||
|
|
||||||
|
find_package(ECM 6.0 REQUIRED NO_MODULE)
|
||||||
|
set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH})
|
||||||
|
include(KDEInstallDirs)
|
||||||
|
include(ECMUninstallTarget)
|
||||||
|
|
||||||
|
include(ECMFindQmlModule)
|
||||||
|
ecm_find_qmlmodule(org.kde.kirigami REQUIRED)
|
||||||
|
find_package(KF6 REQUIRED COMPONENTS QQC2DesktopStyle)
|
||||||
|
|
||||||
|
add_custom_target(kirigami_rust
|
||||||
|
ALL
|
||||||
|
COMMAND cargo build --target-dir ${CMAKE_CURRENT_BINARY_DIR}
|
||||||
|
)
|
||||||
|
|
||||||
|
install(
|
||||||
|
PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/debug/kirigami_hello
|
||||||
|
DESTINATION ${KDE_INSTALL_BINDIR}
|
||||||
|
)
|
||||||
|
|
||||||
|
install(FILES org.kde.kirigami_rust.desktop DESTINATION ${KDE_INSTALL_APPDIR})
|
|
@ -2,6 +2,7 @@ use cxx_qt_build::{CxxQtBuilder, QmlModule};
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
CxxQtBuilder::new()
|
CxxQtBuilder::new()
|
||||||
|
.qt_module("Network")
|
||||||
.qml_module(QmlModule {
|
.qml_module(QmlModule {
|
||||||
uri: "org.kde.simplemdviewer",
|
uri: "org.kde.simplemdviewer",
|
||||||
qml_files: &["src/qml/Main.qml"],
|
qml_files: &["src/qml/Main.qml"],
|
||||||
|
|
|
@ -77,7 +77,7 @@ int main(int argc, char *argv[])
|
||||||
// set the application metadata
|
// set the application metadata
|
||||||
// KAboutData::setApplicationData(about);
|
// KAboutData::setApplicationData(about);
|
||||||
QCoreApplication::setOrganizationName(QStringLiteral("lumina"));
|
QCoreApplication::setOrganizationName(QStringLiteral("lumina"));
|
||||||
QCoreApplication::setOrganizationDomain(QStringLiteral("tfcconnection.org"));
|
// QCoreApplication::setOrganizationDomain(QStringLiteral("c.org"));
|
||||||
QCoreApplication::setApplicationName(QStringLiteral("lumina"));
|
QCoreApplication::setApplicationName(QStringLiteral("lumina"));
|
||||||
qSetMessagePattern(QString::fromUtf8("%{category}: %{time h:m:s ap} %{type} %{function}: %{message}\n %{file}"));
|
qSetMessagePattern(QString::fromUtf8("%{category}: %{time h:m:s ap} %{type} %{function}: %{message}\n %{file}"));
|
||||||
|
|
||||||
|
|
|
@ -222,7 +222,7 @@ ColumnLayout {
|
||||||
Component {
|
Component {
|
||||||
id: libraryDelegate
|
id: libraryDelegate
|
||||||
Item {
|
Item {
|
||||||
implicitWidth: ListView.view.width
|
implicitWidth: libraryList.width
|
||||||
height: selectedLibrary == libraryType ? 50 : 0
|
height: selectedLibrary == libraryType ? 50 : 0
|
||||||
property bool rightMenu: false
|
property bool rightMenu: false
|
||||||
property bool selected: selectionModel.hasSelection && selectionModel.currentIndex == innerModel.index(index, 0)
|
property bool selected: selectionModel.hasSelection && selectionModel.currentIndex == innerModel.index(index, 0)
|
||||||
|
@ -250,12 +250,13 @@ ColumnLayout {
|
||||||
|
|
||||||
implicitWidth: libraryList.width
|
implicitWidth: libraryList.width
|
||||||
height: selectedLibrary == libraryType ? 50 : 0
|
height: selectedLibrary == libraryType ? 50 : 0
|
||||||
|
spacing: Kirigami.Unit.gridUnit * 2.0
|
||||||
Controls.Label {
|
Controls.Label {
|
||||||
id: itemTitle
|
id: itemTitle
|
||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
anchors.topMargin: Kirigami.Units.smallSpacing
|
anchors.topMargin: Kirigami.Units.smallSpacing
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.leftMargin: Kirigami.Units.gridUnit * 1.7
|
anchors.leftMargin: Kirigami.Units.gridUnit * 0.7
|
||||||
width: parent.width - Kirigami.Units.gridUnit * 3.5
|
width: parent.width - Kirigami.Units.gridUnit * 3.5
|
||||||
|
|
||||||
text: title
|
text: title
|
||||||
|
@ -284,7 +285,7 @@ ColumnLayout {
|
||||||
anchors.top: itemTitle.bottom
|
anchors.top: itemTitle.bottom
|
||||||
anchors.topMargin: Kirigami.Units.smallSpacing
|
anchors.topMargin: Kirigami.Units.smallSpacing
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.leftMargin: Kirigami.Units.gridUnit * 1.7
|
anchors.leftMargin: Kirigami.Units.gridUnit * 0.7
|
||||||
width: parent.width - Kirigami.Units.gridUnit * 3.5
|
width: parent.width - Kirigami.Units.gridUnit * 3.5
|
||||||
font.pointSize: 9
|
font.pointSize: 9
|
||||||
text: {
|
text: {
|
||||||
|
@ -315,10 +316,25 @@ ColumnLayout {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
icon.source: itemIcon
|
Kirigami.Icon {
|
||||||
icon.width: Kirigami.Units.gridUnit
|
id: trailing
|
||||||
icon.height: Kirigami.Units.gridUnit
|
anchors.right: parent.right
|
||||||
/* supportsMouseEvents: false */
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
anchors.rightMargin: 28
|
||||||
|
implicitWidth: Kirigami.Units.gridUnit
|
||||||
|
source: itemIcon
|
||||||
|
|
||||||
|
Binding on color {
|
||||||
|
when: dragHandler.containsMouse ||
|
||||||
|
(selectionModel.hasSelection &&
|
||||||
|
selectionModel.isSelected(proxyModel.idx(index)))
|
||||||
|
value: Kirigami.Theme.highlightedTextColor
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/* icon.source: itemIcon */
|
||||||
|
/* icon.width: Kirigami.Units.gridUnit */
|
||||||
|
/* icon.height: Kirigami.Units.gridUnit */
|
||||||
|
/* /\* supportsMouseEvents: false *\/ */
|
||||||
|
|
||||||
Behavior on height {
|
Behavior on height {
|
||||||
NumberAnimation {
|
NumberAnimation {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue