Compare commits
No commits in common. "eef1903557c018496c16090e34192eaae665929b" and "b56425c671a08783084d46a7beaccfd01cd6454a" have entirely different histories.
eef1903557
...
b56425c671
5 changed files with 12 additions and 59 deletions
14
flake.nix
14
flake.nix
|
@ -32,7 +32,6 @@
|
||||||
"rustfmt"
|
"rustfmt"
|
||||||
])
|
])
|
||||||
rust-analyzer
|
rust-analyzer
|
||||||
qt6.wrapQtAppsHook
|
|
||||||
];
|
];
|
||||||
|
|
||||||
bi = with pkgs; [
|
bi = with pkgs; [
|
||||||
|
@ -44,6 +43,7 @@
|
||||||
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}/include";
|
# KDE_INCLUDEDIR = "${pkgs.kdePackages.kirigami.dev}/include";
|
||||||
# KDE_QMLDIR = "${pkgs.kdePackages.kirigami}/lib/qt-6/qml/";
|
# KDE_QMLDIR = "${pkgs.kdePackages.kirigami.dev}/lib/qt-6/qml/org/kde/kirigami/";
|
||||||
|
|
||||||
# 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,12 +117,6 @@
|
||||||
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";
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,24 +0,0 @@
|
||||||
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,7 +2,6 @@ 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("c.org"));
|
QCoreApplication::setOrganizationDomain(QStringLiteral("tfcconnection.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: libraryList.width
|
implicitWidth: ListView.view.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,13 +250,12 @@ 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 * 0.7
|
anchors.leftMargin: Kirigami.Units.gridUnit * 1.7
|
||||||
width: parent.width - Kirigami.Units.gridUnit * 3.5
|
width: parent.width - Kirigami.Units.gridUnit * 3.5
|
||||||
|
|
||||||
text: title
|
text: title
|
||||||
|
@ -285,7 +284,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 * 0.7
|
anchors.leftMargin: Kirigami.Units.gridUnit * 1.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: {
|
||||||
|
@ -316,25 +315,10 @@ ColumnLayout {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Kirigami.Icon {
|
icon.source: itemIcon
|
||||||
id: trailing
|
icon.width: Kirigami.Units.gridUnit
|
||||||
anchors.right: parent.right
|
icon.height: Kirigami.Units.gridUnit
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
/* supportsMouseEvents: false */
|
||||||
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