Skip to content

Commit

Permalink
v0.15.2 (#33)
Browse files Browse the repository at this point in the history
fixed alignment when battery percent displayed
  • Loading branch information
RBertoCases authored Jul 18, 2023
1 parent a4ad32e commit 5af585b
Show file tree
Hide file tree
Showing 5 changed files with 96 additions and 92 deletions.
8 changes: 7 additions & 1 deletion README.MD
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

A clean and simple theme that aims to recreate the experience of Nintendo's Switch console. skylineOS is a theme for [Pegasus Frontend](http://pegasus-frontend.org/) forked from switchOS.

![skylineOS Pegasus theme](assets/images/screenshot_bar_start.jpg)

![skylineOS Pegasus theme](assets/images/screenshot_bar_end.png)

![skylineOS Pegasus theme](assets/images/screenshot_allsoft.png)
Expand All @@ -16,6 +18,10 @@ See [wiki](https://github.com/RBertoCases/skylineOS/wiki) for more information.

## Latest Releases

### v0.15.2
- Fixed issue on Windows where battery icon wasn't aligned correctly when displaying the Battery Percentage as well
- General system stability improvements have been made to enhance the user's experience

### v0.15.1
- Adjusted size of Sort Arrow
- Fixed drop shadow behavior on highlight
Expand All @@ -39,4 +45,4 @@ Button Prompts

- Author: [Zacksly](https://zacksly.itch.io)
- Source: https://zacksly.itch.io/switch-button-icons-and-controls
- License: [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
- License: [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
Binary file added assets/images/screenshot_bar_start.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion layer_home/HomeBar.qml
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ ListView {
fillMode: (gameBG == gameData.assets.boxFront) ? Image.PreserveAspectFit : Image.PreserveAspectCrop
source: gameBG // gameData.collections.get(0).shortName === "steam" ? gameData.assets.screenshot : gameBG
asynchronous: true
sourceSize { width: 512; height: 512 }
sourceSize { width: 256; height: 256 }

anchors.centerIn: parent

Expand Down
176 changes: 87 additions & 89 deletions layer_home/HomeScreen.qml
Original file line number Diff line number Diff line change
Expand Up @@ -120,17 +120,18 @@ FocusScope
}

RowLayout {
spacing: vpx(15)
spacing: vpx(5)
anchors {
verticalCenter: profileIcon.verticalCenter;
right: parent.right; rightMargin: vpx(15)
}

Text
{
id: sysTime

//12HR-"h:mmap" 24HR-"hh:mm"
property var timeSetting: (settings.timeFormat === "12hr") ? "h:mmap" : "hh:mm";
property var timeSetting: (settings.timeFormat === "12hr") ? "h:mmap " : "hh:mm ";

function set() {
sysTime.text = Qt.formatTime(new Date(), timeSetting)
Expand Down Expand Up @@ -158,110 +159,107 @@ FocusScope
horizontalAlignment: Text.Right
font.capitalization: Font.SmallCaps
}
Row{
spacing: vpx(5)

Text {
id: batteryPercentage
Text {
id: batteryPercentage

function set() {
batteryPercentage.text = homeScreenContainer.batteryStatus+"%";
}
function set() {
batteryPercentage.text = homeScreenContainer.batteryStatus+"%";
}

Timer {
id: percentTimer
interval: 60000 // Run the timer every minute
repeat: isNaN(api.device.batteryPercent) ? false : showPercent
running: isNaN(api.device.batteryPercent) ? false : showPercent
triggeredOnStart: isNaN(api.device.batteryPercent) ? "" : showPercent
onTriggered: batteryPercentage.set()
}
Timer {
id: percentTimer
interval: 60000 // Run the timer every minute
repeat: isNaN(api.device.batteryPercent) ? false : showPercent
running: isNaN(api.device.batteryPercent) ? false : showPercent
triggeredOnStart: isNaN(api.device.batteryPercent) ? "" : showPercent
onTriggered: batteryPercentage.set()
}

color: theme.text
font.family: titleFont.name
font.weight: Font.Bold
font.letterSpacing: 1
font.pixelSize: Math.round(screenheight*0.0277)
//horizontalAlignment: Text.Right

Component.onCompleted: font.capitalization = Font.SmallCaps
anchors {
verticalCenter: sysTime.verticalCenter
}
visible: isNaN(api.device.batteryPercent) ? false : showPercent
color: theme.text
font.family: titleFont.name
font.weight: Font.Bold
font.letterSpacing: 1
font.pixelSize: Math.round(screenheight*0.0277)
//horizontalAlignment: Text.Right

Component.onCompleted: font.capitalization = Font.SmallCaps
anchors {
verticalCenter: sysTime.verticalCenter
}
visible: isNaN(api.device.batteryPercent) ? false : showPercent
}

BatteryIcon{
id: batteryIcon
width: Math.round(screenheight * 0.0433)
height: width / 1.5
layer.enabled: true
layer.effect: ColorOverlay {
color: theme.text
antialiasing: true
cached: true
}
BatteryIcon{
id: batteryIcon
width: Math.round(screenheight * 0.0433)
height: width / 1.5
layer.enabled: true
layer.effect: ColorOverlay {
color: theme.text
antialiasing: true
cached: true
}

function set() {
batteryIcon.level = homeScreenContainer.batteryStatus;
}
function set() {
batteryIcon.level = homeScreenContainer.batteryStatus;
}

Timer {
id: iconTimer
interval: 60000 // Run the timer every minute
repeat: true
running: true
triggeredOnStart: true
onTriggered: batteryIcon.set()
}
Timer {
id: iconTimer
interval: 60000 // Run the timer every minute
repeat: true
running: true
triggeredOnStart: true
onTriggered: batteryIcon.set()
}

anchors {
verticalCenter: sysTime.verticalCenter
}
visible: isNaN(api.device.batteryPercent) ? false : true

anchors {
verticalCenter: sysTime.verticalCenter
}
visible: isNaN(api.device.batteryPercent) ? false : true

Image{
id: chargingIcon

property bool chargingStatus: api.device.batteryCharging

width: Math.round(screenheight * 0.0433)
height: width/1.5
fillMode: Image.PreserveAspectFit
source: "../assets/images/charging.svg"
sourceSize.width: 32
sourceSize.height: 64
smooth: true
horizontalAlignment: Image.AlignLeft
anchors {
verticalCenter: sysTime.verticalCenter
}
visible: chargingStatus && batteryIcon.level < 99
layer.enabled: true
layer.effect: ColorOverlay {
color: theme.text
antialiasing: true
cached: true
}
}

function set() {
chargingStatus = api.device.batteryCharging;
}
Image{
id: chargingIcon

Timer {
id: chargingIconTimer
interval: 10000 // Run the timer every minute
repeat: isNaN(api.device.batteryPercent) ? false : true
running: isNaN(api.device.batteryPercent) ? false : true
triggeredOnStart: isNaN(api.device.batteryPercent) ? false : true
onTriggered: chargingIcon.set()
}
property bool chargingStatus: api.device.batteryCharging

width: Math.round(screenheight * 0.0433)
height: width
fillMode: Image.PreserveAspectFit
source: "../assets/images/charging.svg"
sourceSize.width: vpx(10)
sourceSize.height: vpx(15)
smooth: true
horizontalAlignment: Image.AlignLeft
anchors {
verticalCenter: sysTime.verticalCenter
}
visible: chargingStatus && batteryIcon.level < 99
layer.enabled: true
layer.effect: ColorOverlay {
color: theme.text
antialiasing: true
cached: true
}

function set() {
chargingStatus = api.device.batteryCharging;
}

Timer {
id: chargingIconTimer
interval: 10000 // Run the timer every minute
repeat: isNaN(api.device.batteryPercent) ? false : true
running: isNaN(api.device.batteryPercent) ? false : true
triggeredOnStart: isNaN(api.device.batteryPercent) ? false : true
onTriggered: chargingIcon.set()
}

}


}
}
Expand Down
2 changes: 1 addition & 1 deletion theme.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: skylineOS
author: RbertoCases
version: 0.15.1
version: 0.15.2
keywords: clean, modern, nintendo, switch, 16:10, 16:9, 4:3
summary: A theme aiming to emulate the experience of the Nintendo Switch UX, fork of switchOS
assets.screenshots:
Expand Down

0 comments on commit 5af585b

Please sign in to comment.