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"
|
||||
])
|
||||
rust-analyzer
|
||||
qt6.wrapQtAppsHook
|
||||
];
|
||||
|
||||
bi = with pkgs; [
|
||||
|
@ -43,7 +44,6 @@
|
|||
cmake
|
||||
kdePackages.extra-cmake-modules
|
||||
pkg-config
|
||||
qt6.wrapQtAppsHook
|
||||
makeWrapper
|
||||
|
||||
openssl.dev
|
||||
|
@ -56,7 +56,7 @@
|
|||
# clang-format
|
||||
qt6.full
|
||||
qt6.qttools
|
||||
qt6.qtbase
|
||||
# qt6.qtbase
|
||||
# qt6.qtquickcontrols2
|
||||
# qt6.qtx11extras
|
||||
qt6.qtmultimedia
|
||||
|
@ -106,8 +106,8 @@
|
|||
CMAKE_C_COMPILER = "${pkgs.gcc}/bin/gcc";
|
||||
CMAKE_CXX_COMPILER = "${pkgs.gcc}/bin/g++";
|
||||
CARGO_PROFILE_RELEASE_BUILD_OVERRIDE_DEBUG = true;
|
||||
# KDE_INCLUDEDIR = "${pkgs.kdePackages.kirigami.dev}/include";
|
||||
# KDE_QMLDIR = "${pkgs.kdePackages.kirigami.dev}/lib/qt-6/qml/org/kde/kirigami/";
|
||||
# KDE_INCLUDEDIR = "${pkgs.kdePackages.kirigami}/include";
|
||||
# KDE_QMLDIR = "${pkgs.kdePackages.kirigami}/lib/qt-6/qml/";
|
||||
|
||||
# This creates the proper qt env so that plugins are found right.
|
||||
shellHook = ''
|
||||
|
@ -117,6 +117,12 @@
|
|||
sed "/^exec/d" -i "$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 =
|
||||
"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() {
|
||||
CxxQtBuilder::new()
|
||||
.qt_module("Network")
|
||||
.qml_module(QmlModule {
|
||||
uri: "org.kde.simplemdviewer",
|
||||
qml_files: &["src/qml/Main.qml"],
|
||||
|
|
|
@ -77,7 +77,7 @@ int main(int argc, char *argv[])
|
|||
// set the application metadata
|
||||
// KAboutData::setApplicationData(about);
|
||||
QCoreApplication::setOrganizationName(QStringLiteral("lumina"));
|
||||
QCoreApplication::setOrganizationDomain(QStringLiteral("tfcconnection.org"));
|
||||
// QCoreApplication::setOrganizationDomain(QStringLiteral("c.org"));
|
||||
QCoreApplication::setApplicationName(QStringLiteral("lumina"));
|
||||
qSetMessagePattern(QString::fromUtf8("%{category}: %{time h:m:s ap} %{type} %{function}: %{message}\n %{file}"));
|
||||
|
||||
|
|
|
@ -222,7 +222,7 @@ ColumnLayout {
|
|||
Component {
|
||||
id: libraryDelegate
|
||||
Item {
|
||||
implicitWidth: ListView.view.width
|
||||
implicitWidth: libraryList.width
|
||||
height: selectedLibrary == libraryType ? 50 : 0
|
||||
property bool rightMenu: false
|
||||
property bool selected: selectionModel.hasSelection && selectionModel.currentIndex == innerModel.index(index, 0)
|
||||
|
@ -250,12 +250,13 @@ ColumnLayout {
|
|||
|
||||
implicitWidth: libraryList.width
|
||||
height: selectedLibrary == libraryType ? 50 : 0
|
||||
spacing: Kirigami.Unit.gridUnit * 2.0
|
||||
Controls.Label {
|
||||
id: itemTitle
|
||||
anchors.top: parent.top
|
||||
anchors.topMargin: Kirigami.Units.smallSpacing
|
||||
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
|
||||
|
||||
text: title
|
||||
|
@ -284,7 +285,7 @@ ColumnLayout {
|
|||
anchors.top: itemTitle.bottom
|
||||
anchors.topMargin: Kirigami.Units.smallSpacing
|
||||
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
|
||||
font.pointSize: 9
|
||||
text: {
|
||||
|
@ -315,10 +316,25 @@ ColumnLayout {
|
|||
}
|
||||
}
|
||||
|
||||
icon.source: itemIcon
|
||||
icon.width: Kirigami.Units.gridUnit
|
||||
icon.height: Kirigami.Units.gridUnit
|
||||
/* supportsMouseEvents: false */
|
||||
Kirigami.Icon {
|
||||
id: trailing
|
||||
anchors.right: parent.right
|
||||
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 {
|
||||
NumberAnimation {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue