Skip to content

Commit

Permalink
Added support for Kivy v1.7.0 and above (padding changed to list vari…
Browse files Browse the repository at this point in the history
…able). Closed #3
  • Loading branch information
stocyr committed Mar 2, 2014
1 parent 2f5a4a3 commit 6c20ed2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/icarustouch.kv
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,13 @@
BoxLayout:
spacing: 30
padding: 10
size_hint_y: 0.18 size_hint_x: None width: 2*(self.height - 2*self.padding) + self.spacing + 2*self.padding
size_hint_y: 0.18 size_hint_x: None width: 2*(self.height - 2*self.padding[0]) + self.spacing + 2*self.padding[0]
pos_hint: {'center_x':0.5}
ToggleButton:
id: pitch_lock_button background_normal: 'images/Pitch_Unlocked.png' background_down: 'images/Pitch_Locked.png' on_press: root.on_pitch_lock_button_press() state: 'down' if root.app.config.get('General', 'PitchLock') == 'On' else 'normal' border: 0, 0, 0, 0
ToggleButton:
id: y_axis_volume_button
background_normal: 'images/X-Axis_mod.png' background_down: 'images/X-Axis_vol.png' on_press: root.on_y_axis_volume_button_press() state: 'down' if root.app.config.get('General', 'YAxis') == 'Volume' else 'normal' border: 0, 0, 0, 0
# The two little buttons on the bottom-right:
BoxLayout: spacing: 15 padding: 10 size_hint_y: 0.15 size_hint_x: None width: 2*(self.height - 2*self.padding) + self.spacing + 2*self.padding pos_hint: {'right':1} Button: id: look_button background_normal: 'images/Look.png' background_down: 'images/Look.png' on_press: root.open_my_settings_panel() border: 0, 0, 0, 0 Button: id: settings_button background_normal: 'images/Settings.png' background_down: 'images/Settings.png' on_press: root.open_settings() border: 0, 0, 0, 0 # Maybe we could also add an "Exit" button on the top-right? #Button: # size_hint: None, None # width: root.width / 30 # height: self.width # pos_hint: {'right':0.98, 'top': 0.95} # text: "X" # on_press: root.app.stop()
BoxLayout: spacing: 15 padding: 10 size_hint_y: 0.15 size_hint_x: None width: 2*(self.height - 2*self.padding[0]) + self.spacing + 2*self.padding[0] pos_hint: {'right':1} Button: id: look_button background_normal: 'images/Look.png' background_down: 'images/Look.png' on_press: root.open_my_settings_panel() border: 0, 0, 0, 0 Button: id: settings_button background_normal: 'images/Settings.png' background_down: 'images/Settings.png' on_press: root.open_settings() border: 0, 0, 0, 0 # Maybe we could also add an "Exit" button on the top-right? #Button: # size_hint: None, None # width: root.width / 30 # height: self.width # pos_hint: {'right':0.98, 'top': 0.95} # text: "X" # on_press: root.app.stop()
# The custom settingspanel for the appearance settings:<MySettingsPanel>: background_scroll_view_grid: background_scroll_view_grid keyboard_scroll_view_box: keyboard_scroll_view_box size: root.size # left panel containing the background images ScrollView: size: 500, 700 x: 32 y: 32 do_scroll_x: False #scroll_distance: 5 #scroll_timeout: 250 scroll_friction: 3 # add the same border-shadow combination as on the keyboard canvas.before: Color: rgba: 1, 1, 1, 1 BorderImage: source: 'images/Shadow+Border_38.png' border: (38, 38, 38, 38) size: (self.width+38*2, self.height+38*2) pos: (self.x-38, self.y-38) # the actual content: a gridLayout filled with the images GridLayout: id: background_scroll_view_grid cols: 2 size_hint_y: None spacing: 10 # the background of the panel: dark, but half-transparent canvas: Color: rgba: 0, 0, 0, 0.7 Rectangle: pos: self.pos size: self.size # right panel containing the keyboard images ScrollView: size: 500, 700 right: win.Window.width - 32 y: 32 do_scroll_x: False #scroll_distance: 5 #scroll_timeout: 250 scroll_friction: 2 # add the same border-shadow combination as on the keyboard canvas.before: Color: rgba: 1, 1, 1, 1 BorderImage: source: 'images/Shadow+Border_38.png' border: (38, 38, 38, 38) size: (self.width+38*2, self.height+38*2) pos: (self.x-38, self.y-38) # the actual contend: a boxLayout filled with the images BoxLayout: id: keyboard_scroll_view_box orientation: 'vertical' size_hint_y: None spacing: 10 # the background of the panel: dark, but half-transparent canvas: Color: rgba: 0, 0, 0, 0.7 Rectangle: pos: self.pos size: self.size
Expand Down
2 changes: 1 addition & 1 deletion src/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
import pygame.midi

import kivy
kivy.require('1.0.9')
kivy.require('1.7.0')

from kivy.app import App
from kivy.config import Config
Expand Down

0 comments on commit 6c20ed2

Please sign in to comment.