Skip to content

Commit

Permalink
macO improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
emericg committed Sep 17, 2023
1 parent c124243 commit bd2b254
Show file tree
Hide file tree
Showing 7 changed files with 50 additions and 26 deletions.
1 change: 1 addition & 0 deletions assets/assets.qrc
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<qresource prefix="/assets">
<file>logos/logo.svg</file>
<file>logos/icon.svg</file>
<file>logos/splash.svg</file>
<file>logos/github.svg</file>

<file>icons_bootstrap/bluetooth.svg</file>
Expand Down
25 changes: 12 additions & 13 deletions assets/logos/icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
24 changes: 24 additions & 0 deletions assets/logos/splash.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 4 additions & 5 deletions qml/DesktopApplication.qml
Original file line number Diff line number Diff line change
Expand Up @@ -74,14 +74,13 @@ ApplicationWindow {
function onUbertoothButtonClicked() { screenUbertooth.loadScreen() }
function onSettingsButtonClicked() { screenSettings.loadScreen() }
}
/*

Connections {
target: menubarManager
function onSensorsClicked() { appContent.state = "Scanner" }
function onSettingsClicked() { screenSettings.loadScreen() }
function onAboutClicked() { screenAbout.loadScreen() }
function onAboutClicked() { screenSettings.loadScreen() }
}
*/

Connections {
target: Qt.application
function onStateChanged() {
Expand Down Expand Up @@ -401,7 +400,7 @@ ApplicationWindow {
anchors.centerIn: parent
width: 320
height: 320
source: "qrc:/assets/logos/icon.svg"
source: "qrc:/assets/logos/splash.svg"
sourceSize: Qt.size(width, height)

Behavior on opacity { OpacityAnimator { duration: 666; } }
Expand Down
14 changes: 7 additions & 7 deletions qml/PanelDeviceInfos.qml
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,10 @@ Flickable {
anchors.rightMargin: 8
anchors.verticalCenter: parent.verticalCenter

property int legendWidth: 80
property int legendWidth: 64

Component.onCompleted: {
legendWidth = 80
legendWidth = 64
legendWidth = Math.max(legendWidth, legendName.contentWidth)
legendWidth = Math.max(legendWidth, legendBluetooth.contentWidth)
if (Qt.platform.os === "osx") {
Expand Down Expand Up @@ -286,10 +286,10 @@ Flickable {
anchors.rightMargin: 8
anchors.verticalCenter: parent.verticalCenter

property int legendWidth: 80
property int legendWidth: 64

Component.onCompleted: {
legendWidth = 80
legendWidth = 64
legendWidth = Math.max(legendWidth, legendCategory.contentWidth)
legendWidth = Math.max(legendWidth, legendDeviceType.contentWidth)
legendWidth = Math.max(legendWidth, legendService.contentWidth)
Expand Down Expand Up @@ -424,7 +424,7 @@ Flickable {
anchors.right: parent.right
spacing: 12

property int www: (width > 320) ? ((width - spacing) / 2) : width
property int www: (width > 400) ? ((width - spacing) / 2) : width

ButtonScanMenu {
width: parent.www
Expand Down Expand Up @@ -616,10 +616,10 @@ Flickable {
anchors.right: parent.right
anchors.rightMargin: 8

property int legendWidth: 80
property int legendWidth: 64

Component.onCompleted: {
legendWidth = 80
legendWidth = 64
legendWidth = Math.max(legendWidth, legendRSSI.contentWidth)
legendWidth = Math.max(legendWidth, legendAdvertising.contentWidth)
}
Expand Down
1 change: 1 addition & 0 deletions qml/components/ButtonScanMenu.qml
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,7 @@ T.Button {
Layout.fillWidth: true
Layout.alignment: Qt.AlignVCenter

font: control.font
elide: Text.ElideMiddle
horizontalAlignment: Text.AlignLeft
verticalAlignment: Text.AlignVCenter
Expand Down
2 changes: 1 addition & 1 deletion src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ int main(int argc, char *argv[])

#if !defined(Q_OS_ANDROID) && !defined(Q_OS_IOS)
// Application icon
QIcon appIcon(":/assets/logos/logo.svg");
QIcon appIcon(":/assets/logos/icon.svg");
app.setWindowIcon(appIcon);
#endif

Expand Down

0 comments on commit bd2b254

Please sign in to comment.