Skip to content

Commit

Permalink
Various cleanups
Browse files Browse the repository at this point in the history
  • Loading branch information
emericg committed Sep 23, 2023
1 parent 26b02fe commit 80650aa
Show file tree
Hide file tree
Showing 7 changed files with 45 additions and 39 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ name: "CI builds"
on:
push:
pull_request:
workflow_dispatch:

#--------------------------------------------------------------------------------
# Define application name & version
#--------------------------------------------------------------------------------

env:
VERSION: "0.10"
APPLICATION: "MiniVideoInfos"
QMAKE_PROJECT: "MiniVideoInfos.pro"
APP_NAME: "MiniVideoInfos"
APP_VERSION: "0.10"
QT_VERSION: "6.5.2"

#--------------------------------------------------------------------------------
Expand Down Expand Up @@ -57,5 +57,5 @@ jobs:
- name: Build application
run: |
qmake --version
qmake ${{env.QMAKE_PROJECT}} DEFINES+=USE_CONTRIBS CONFIG+=release PREFIX=/usr
qmake ${{env.APP_NAME}}.pro DEFINES+=USE_CONTRIBS CONFIG+=release PREFIX=/usr
make -j$(nproc)
10 changes: 5 additions & 5 deletions MiniVideoInfos.pro
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ ios | android { DEFINES += USE_CONTRIBS }
# Use Qt Quick compiler
ios | android { CONFIG += qtquickcompiler }

win32 { DEFINES += _USE_MATH_DEFINES }

# Project modules ##############################################################

# AppUtils
Expand Down Expand Up @@ -145,9 +143,11 @@ unix {
#QMAKE_LFLAGS += -fsanitize=address,undefined
}

win32 { DEFINES += _USE_MATH_DEFINES }

DEFINES += QT_DEPRECATED_WARNINGS

CONFIG(release, debug|release) : DEFINES += QT_NO_DEBUG_OUTPUT
CONFIG(release, debug|release) : DEFINES += NDEBUG QT_NO_DEBUG QT_NO_DEBUG_OUTPUT

# Build artifacts ##############################################################

Expand All @@ -158,8 +158,8 @@ UI_DIR = build/$${QT_ARCH}/

DESTDIR = bin/

################################################################################
# Application deployment and installation steps

# Application deployment steps #################################################

linux:!android {
TARGET = $$lower($${TARGET})
Expand Down
43 changes: 15 additions & 28 deletions qml/MobileDrawer.qml
Original file line number Diff line number Diff line change
Expand Up @@ -3,39 +3,21 @@ import QtQuick.Controls

import ThemeEngine

Drawer {
width: (appWindow.screenOrientation === Qt.PortraitOrientation || appWindow.width < 480)
? 0.8 * appWindow.width : 0.5 * appWindow.width
height: appWindow.height

////////////////////////////////////////////////////////////////////////////

background: Rectangle {
color: Theme.colorBackground

Rectangle { // left border
x: parent.width
width: 1
height: parent.height
color: Theme.colorSeparator
}
}

////////////////////////////////////////////////////////////////////////////

DrawerThemed {
contentItem: Item {

////////////////

Column {
id: rectangleHeader
id: headerColumn
anchors.top: parent.top
anchors.left: parent.left
anchors.right: parent.right
z: 5

////////

Rectangle {
id: rectangleStatusbar
Rectangle { // statusbar area
anchors.left: parent.left
anchors.right: parent.right

Expand All @@ -45,8 +27,7 @@ Drawer {

////////

Rectangle {
id: rectangleLogo
Rectangle { // header area
anchors.left: parent.left
anchors.right: parent.right

Expand Down Expand Up @@ -79,12 +60,14 @@ Drawer {
verticalAlignment: Text.AlignVCenter
}
}

////////
}

////////////////

Flickable {
anchors.top: rectangleHeader.bottom
anchors.top: headerColumn.bottom
anchors.left: parent.left
anchors.right: parent.right
anchors.bottom: parent.bottom
Expand All @@ -99,6 +82,10 @@ Drawer {

////////

ListSeparatorPadded { }

////////

DrawerItem {
highlighted: (appContent.state === "MediaList" && screenMediaList.dialogIsOpen)
text: qsTr("Open media")
Expand Down Expand Up @@ -168,7 +155,7 @@ Drawer {
////////
}
}
}

////////////////////////////////////////////////////////////////////////////
////////////////
}
}
3 changes: 1 addition & 2 deletions qml/MobileMenu.qml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import QtQuick
import QtQuick.Controls

import ThemeEngine

Expand Down Expand Up @@ -35,7 +34,7 @@ Item {

////////////////////////////////////////////////////////////////////////////

Item { // main menu
Item { // menu area
id: mainmenu
anchors.top: parent.top
anchors.left: parent.left
Expand Down
17 changes: 17 additions & 0 deletions qml/MobilePermissions.qml
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,23 @@ Item {
font.pixelSize: Theme.fontSizeContentSmall
}

ButtonWireframeIcon {
anchors.left: parent.left
anchors.leftMargin: appHeader.headerPosition
height: 36

visible: utilsApp.getAndroidSdkVersion() >= 30

primaryColor: Theme.colorPrimary
secondaryColor: Theme.colorBackground

text: qsTr("Permission info")
source: "qrc:/assets/icons_material/duotone-tune-24px.svg"
sourceSize: 20

onClicked: utilsApp.openAndroidStorageSettings("com.minivideo.infos")
}

////////

ListSeparatorPadded {
Expand Down
1 change: 1 addition & 0 deletions qml/components.qrc
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@
<file alias="CheckBoxThemed.qml">components_themed/CheckBoxThemed.qml</file>
<file alias="ComboBoxThemed.qml">components_themed/ComboBoxThemed.qml</file>
<file alias="DialThemed.qml">components_themed/DialThemed.qml</file>
<file alias="DrawerThemed.qml">components_themed/DrawerThemed.qml</file>
<file alias="ItemDelegateThemed.qml">components_themed/ItemDelegateThemed.qml</file>
<file alias="MiddleSliderThemed.qml">components_themed/MiddleSliderThemed.qml</file>
<file alias="PageIndicatorThemed.qml">components_themed/PageIndicatorThemed.qml</file>
Expand Down
2 changes: 2 additions & 0 deletions qml/components/TextEditMVI.qml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ TextEdit {
readOnly: true
selectByMouse: isDesktop
selectionColor: Theme.colorPrimary
selectedTextColor: "white"

color: Theme.colorText
font.pixelSize: 15
wrapMode: Text.WrapAnywhere
Expand Down

0 comments on commit 80650aa

Please sign in to comment.