Skip to content

Commit

Permalink
settings page project links
Browse files Browse the repository at this point in the history
  • Loading branch information
PrinceOfPuppers committed Dec 7, 2020
1 parent c0f2c09 commit 7be3f3a
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 14 deletions.
9 changes: 8 additions & 1 deletion sync_dl_gui/screens.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
import sync_dl.config as cfg
import time
import sys
import webbrowser

from elements import Console,PlaylistList

Expand Down Expand Up @@ -195,4 +196,10 @@ def setMusicDir(self):

cfg.writeToConfig('musicDir',self.musicDir.text.strip())

cfg.logger.info(f"Music Directory Changed")
cfg.logger.info(f"Music Directory Changed")

def FrontEndLink(self):
webbrowser.open('https://github.com/PrinceOfPuppers/sync-dl-gui')

def backEndLink(self):
webbrowser.open('https://github.com/PrinceOfPuppers/sync-dl')
52 changes: 39 additions & 13 deletions sync_dl_gui/screens/settingsScreen.kv
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,18 @@
name: "settingsScreen"
musicDir:musicDir
console: console
GridLayout:
cols:1
BoxLayout:
orientation:'vertical'

Title:
text: "Settings"

GridLayout:
cols:2
padding:(gaps,gaps)
spacing:(0,gaps)
size_hint_y:None
height:self.minimum_height

LabelPlate:
text: "Backend\nVersion"
Expand All @@ -33,9 +35,6 @@
SettingTextEntry:
text: root.getSyncDlVersion()
use_bubble:False
#readonly:True



LabelPlate:
text: "Music\nDirectory"
Expand All @@ -53,22 +52,23 @@
text: root.getMusicDir()
on_text_validate: root.setMusicDir()





GridLayout:
cols:1
padding:(gaps,0,gaps,gaps)
spacing:(0,gaps)
Button:
background_color:greyA
text: "Apply"

size_hint_y:None
size_hint_x:None
width: root.width*0.3
height: root.height*0.1
on_release:
root.setMusicDir()


ScrollView:
size_hint_y:None
height: root.height*0.1
ScrollView:
Console:
scrollView:self.parent
size_hint_y:None
Expand All @@ -78,10 +78,36 @@
id: console


GridLayout:
cols:2
size_hint_y:None
height:self.minimum_height

Button:
background_color: greyA
text: "GitHub FrontEnd"

size_hint_y:None

height: root.height*0.1
on_release:
root.FrontEndLink()

Button:
background_color: greyA
text: "GitHub Backend"

size_hint_y:None

height: root.height*0.1
on_release:
root.backEndLink()
GridLayout:
cols:1

size_hint_y:None
height: root.height*0.1

Button:
text: "Back"
background_color:darkGreyA
Expand Down

0 comments on commit 7be3f3a

Please sign in to comment.