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
|
||||
edit-paste
|
||||
window-close
|
||||
document-save-as
|
||||
document-open
|
||||
insert-text
|
||||
edit-copy
|
||||
document-open-recent
|
||||
list-remove
|
||||
application-exit
|
||||
applications-internet
|
||||
dialog-cancel
|
||||
dialog-ok
|
||||
dialog-ok-apply
|
||||
flag-black
|
||||
dialog-password
|
||||
edit-clear
|
||||
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-close
|
||||
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-show-off
|
||||
password-show-on
|
||||
passwordmanager
|
||||
preferences-desktop-icons
|
||||
preferences-desktop-locale
|
||||
qtcreator
|
||||
sheet
|
||||
story-editor
|
||||
system-file-manager
|
||||
system-run
|
||||
system-search
|
||||
window-close
|
||||
)
|
||||
|
||||
# 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:
|
||||
|
||||
```
|
||||
# specify Android platform
|
||||
_android_arch=arm64-v8a
|
||||
_android_toolchain=aarch64-linux-android
|
||||
_android_api_level=21
|
||||
|
||||
# set project name
|
||||
_reponame=passwordmanager
|
||||
_pkgname=passwordmanager
|
||||
|
||||
# locate SDK, NDK and further libraries
|
||||
android_sdk_root=${ANDROID_SDK_ROOT:-/opt/android-sdk}
|
||||
android_ndk_root=${ANDROID_NDK_ROOT:-/opt/android-ndk}
|
||||
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
|
||||
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 \
|
||||
-DCMAKE_BUILD_TYPE=Debug \
|
||||
-DCMAKE_TOOLCHAIN_FILE=/usr/share/ECM/toolchain/Android.cmake \
|
||||
|
@ -88,6 +94,8 @@ cmake \
|
|||
-DNO_DOXYGEN=ON \
|
||||
-DWIDGETS_GUI=OFF \
|
||||
-DQUICK_GUI=ON \
|
||||
-DBUILTIN_ICON_THEMES=breeze \
|
||||
-DBREEZEICONS_DIR="$PWD" \
|
||||
$SOURCES/subdirs/$_reponame
|
||||
|
||||
make create-apk -j$(nproc)
|
||||
|
|
|
@ -13,7 +13,7 @@ Kirigami.ApplicationWindow {
|
|||
globalDrawer: Kirigami.GlobalDrawer {
|
||||
id: leftMenu
|
||||
title: qsTr("Password manager")
|
||||
titleIcon: "passwordmanager"
|
||||
titleIcon: "qrc://icons/hicolor/128x128/apps/passwordmanager.png"
|
||||
topContent: ColumnLayout {
|
||||
Layout.fillWidth: true
|
||||
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
#include <QQmlApplicationEngine>
|
||||
#include <QSettings>
|
||||
#include <QTextCodec>
|
||||
#include <QIcon>
|
||||
#include <QtQml>
|
||||
|
||||
#ifdef PASSWORD_MANAGER_GUI_QTWIDGETS
|
||||
|
@ -36,6 +37,13 @@ int runQuickGui(int argc, char *argv[], const QtConfigArguments &qtConfigArgs, c
|
|||
qtConfigArgs.applySettings();
|
||||
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
|
||||
QSettings settings(QSettings::IniFormat, QSettings::UserScope, QStringLiteral(PROJECT_NAME));
|
||||
|
||||
|
|
Loading…
Reference in New Issue