Improve icons for Qt Quick / Android
This commit is contained in:
parent
ba78a98cf9
commit
0ecef255c9
|
@ -86,38 +86,49 @@ set(DOC_FILES
|
||||||
)
|
)
|
||||||
|
|
||||||
set(REQUIRED_ICONS
|
set(REQUIRED_ICONS
|
||||||
edit-paste
|
application-exit
|
||||||
window-close
|
applications-internet
|
||||||
document-save-as
|
|
||||||
document-open
|
|
||||||
insert-text
|
|
||||||
edit-copy
|
|
||||||
document-open-recent
|
|
||||||
list-remove
|
|
||||||
dialog-cancel
|
dialog-cancel
|
||||||
dialog-ok
|
dialog-ok
|
||||||
dialog-ok-apply
|
dialog-ok-apply
|
||||||
flag-black
|
|
||||||
dialog-password
|
dialog-password
|
||||||
edit-clear
|
document-close
|
||||||
list-add
|
|
||||||
help-about
|
|
||||||
application-exit
|
|
||||||
flag-blue
|
|
||||||
edit-undo
|
|
||||||
folder
|
|
||||||
system-file-manager
|
|
||||||
document-new
|
|
||||||
document-save
|
|
||||||
applications-internet
|
|
||||||
edit-redo
|
|
||||||
system-run
|
|
||||||
go-next
|
|
||||||
document-export
|
document-export
|
||||||
|
document-new
|
||||||
|
document-open
|
||||||
|
document-open-recent
|
||||||
|
document-save
|
||||||
|
document-save-as
|
||||||
|
edit-clear
|
||||||
|
edit-copy
|
||||||
|
edit-cut
|
||||||
|
edit-delete
|
||||||
|
edit-paste
|
||||||
|
edit-redo
|
||||||
|
edit-rename
|
||||||
|
edit-undo
|
||||||
|
flag-black
|
||||||
|
flag-blue
|
||||||
|
folder
|
||||||
|
folder-symbolic
|
||||||
|
go-next
|
||||||
|
help-about
|
||||||
|
insert-text
|
||||||
|
list-add
|
||||||
|
list-remove
|
||||||
password-generate
|
password-generate
|
||||||
|
password-show-off
|
||||||
|
password-show-on
|
||||||
|
passwordmanager
|
||||||
preferences-desktop-icons
|
preferences-desktop-icons
|
||||||
preferences-desktop-locale
|
preferences-desktop-locale
|
||||||
|
qtcreator
|
||||||
|
sheet
|
||||||
|
story-editor
|
||||||
|
system-file-manager
|
||||||
|
system-run
|
||||||
system-search
|
system-search
|
||||||
|
window-close
|
||||||
)
|
)
|
||||||
|
|
||||||
# find c++utilities
|
# find c++utilities
|
||||||
|
|
|
@ -40,13 +40,16 @@ The Password Manager depends on c++utilities and passwordfile. Checkout the READ
|
||||||
Build c++utilities, passwordfile, qtutilities and passwordmanager in one step to create an Android APK for arm64-v8a:
|
Build c++utilities, passwordfile, qtutilities and passwordmanager in one step to create an Android APK for arm64-v8a:
|
||||||
|
|
||||||
```
|
```
|
||||||
|
# specify Android platform
|
||||||
_android_arch=arm64-v8a
|
_android_arch=arm64-v8a
|
||||||
_android_toolchain=aarch64-linux-android
|
_android_toolchain=aarch64-linux-android
|
||||||
_android_api_level=21
|
_android_api_level=21
|
||||||
|
|
||||||
|
# set project name
|
||||||
_reponame=passwordmanager
|
_reponame=passwordmanager
|
||||||
_pkgname=passwordmanager
|
_pkgname=passwordmanager
|
||||||
|
|
||||||
|
# locate SDK, NDK and further libraries
|
||||||
android_sdk_root=${ANDROID_SDK_ROOT:-/opt/android-sdk}
|
android_sdk_root=${ANDROID_SDK_ROOT:-/opt/android-sdk}
|
||||||
android_ndk_root=${ANDROID_NDK_ROOT:-/opt/android-ndk}
|
android_ndk_root=${ANDROID_NDK_ROOT:-/opt/android-ndk}
|
||||||
qt_version=$(pacman -Q "android-qt5-$_android_arch" | sed 's/.* \(.*\)-.*/\1/')
|
qt_version=$(pacman -Q "android-qt5-$_android_arch" | sed 's/.* \(.*\)-.*/\1/')
|
||||||
|
@ -55,6 +58,9 @@ qt_root=/opt/android-qt5/$qt_version/$_android_arch
|
||||||
other_libs_root=/opt/android-libs/$_android_arch
|
other_libs_root=/opt/android-libs/$_android_arch
|
||||||
root="$android_ndk_root/sysroot;$other_libs_root;$qt_root"
|
root="$android_ndk_root/sysroot;$other_libs_root;$qt_root"
|
||||||
|
|
||||||
|
# use Breeze icons from 'breeze-icons' package
|
||||||
|
ln -s /usr/share/icons/breeze icons
|
||||||
|
|
||||||
cmake \
|
cmake \
|
||||||
-DCMAKE_BUILD_TYPE=Debug \
|
-DCMAKE_BUILD_TYPE=Debug \
|
||||||
-DCMAKE_TOOLCHAIN_FILE=/usr/share/ECM/toolchain/Android.cmake \
|
-DCMAKE_TOOLCHAIN_FILE=/usr/share/ECM/toolchain/Android.cmake \
|
||||||
|
@ -88,6 +94,8 @@ cmake \
|
||||||
-DNO_DOXYGEN=ON \
|
-DNO_DOXYGEN=ON \
|
||||||
-DWIDGETS_GUI=OFF \
|
-DWIDGETS_GUI=OFF \
|
||||||
-DQUICK_GUI=ON \
|
-DQUICK_GUI=ON \
|
||||||
|
-DBUILTIN_ICON_THEMES=breeze \
|
||||||
|
-DBREEZEICONS_DIR="$PWD" \
|
||||||
$SOURCES/subdirs/$_reponame
|
$SOURCES/subdirs/$_reponame
|
||||||
|
|
||||||
make create-apk -j$(nproc)
|
make create-apk -j$(nproc)
|
||||||
|
|
|
@ -13,7 +13,7 @@ Kirigami.ApplicationWindow {
|
||||||
globalDrawer: Kirigami.GlobalDrawer {
|
globalDrawer: Kirigami.GlobalDrawer {
|
||||||
id: leftMenu
|
id: leftMenu
|
||||||
title: qsTr("Password manager")
|
title: qsTr("Password manager")
|
||||||
titleIcon: "passwordmanager"
|
titleIcon: "qrc://icons/hicolor/128x128/apps/passwordmanager.png"
|
||||||
topContent: ColumnLayout {
|
topContent: ColumnLayout {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
|
||||||
|
|
|
@ -11,6 +11,7 @@
|
||||||
#include <QQmlApplicationEngine>
|
#include <QQmlApplicationEngine>
|
||||||
#include <QSettings>
|
#include <QSettings>
|
||||||
#include <QTextCodec>
|
#include <QTextCodec>
|
||||||
|
#include <QIcon>
|
||||||
#include <QtQml>
|
#include <QtQml>
|
||||||
|
|
||||||
#ifdef PASSWORD_MANAGER_GUI_QTWIDGETS
|
#ifdef PASSWORD_MANAGER_GUI_QTWIDGETS
|
||||||
|
@ -36,6 +37,13 @@ int runQuickGui(int argc, char *argv[], const QtConfigArguments &qtConfigArgs, c
|
||||||
qtConfigArgs.applySettings();
|
qtConfigArgs.applySettings();
|
||||||
qtConfigArgs.applySettingsForQuickGui();
|
qtConfigArgs.applySettingsForQuickGui();
|
||||||
|
|
||||||
|
#ifdef Q_OS_ANDROID
|
||||||
|
// assume we're bundling breeze icons under Android
|
||||||
|
if (QIcon::themeName().isEmpty()) {
|
||||||
|
QIcon::setThemeName(QStringLiteral("breeze"));
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
// load settings from configuration file
|
// load settings from configuration file
|
||||||
QSettings settings(QSettings::IniFormat, QSettings::UserScope, QStringLiteral(PROJECT_NAME));
|
QSettings settings(QSettings::IniFormat, QSettings::UserScope, QStringLiteral(PROJECT_NAME));
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue