Skip to content

Commit

Permalink
theme/ texture atlas
Browse files Browse the repository at this point in the history
  • Loading branch information
kiok46 committed Jun 2, 2017
1 parent 58512a5 commit a017ccb
Show file tree
Hide file tree
Showing 569 changed files with 140 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Expand Up @@ -87,3 +87,5 @@ ENV/

# Rope project settings
.ropeproject

.DS_Store
34 changes: 34 additions & 0 deletions Texture-atlas/after_atlas/main.kv
@@ -0,0 +1,34 @@
<Theming>:
spacing: 50
padding: 10, 10
CustomButton:
text: "Button"
BoxLayout:
orientation: "vertical"
ProgressBar:
value: 25
ProgressBar:
value: 50
ProgressBar:
value: 75
BoxLayout:
orientation: "vertical"
CustomCheckBox:
CustomCheckBox:
CustomCheckBox:


<ProgressBar>:
canvas:
Color:
rgb: 1, 1, 1
BorderImage:
border: (12, 12, 12, 12)
pos: self.x, self.center_y - 12
size: self.width, 24
source: 'atlas://textures/red-lightgrey/myatlas/progressbar_background'
BorderImage:
border: [int(min(self.width * (self.value / float(self.max)) if self.max else 0, 12))] * 4
pos: self.x, self.center_y - 12
size: self.width * (self.value / float(self.max)) if self.max else 0, 24
source: 'atlas://textures/red-lightgrey/myatlas/progressbar'
23 changes: 23 additions & 0 deletions Texture-atlas/after_atlas/main.py
@@ -0,0 +1,23 @@
#!/usr/bin/env python3

from kivy.app import App
from kivy.uix.boxlayout import BoxLayout
from kivy.properties import OptionProperty

from src.components import CustomButton, CustomCheckBox


class Theming(BoxLayout):
pass


class MainApp(App):

def build(self):
self.title = 'Theming'
return Theming()


if __name__ == "__main__":
app = MainApp()
app.run()
7 changes: 7 additions & 0 deletions Texture-atlas/after_atlas/src/components/CustomButtons.py
@@ -0,0 +1,7 @@
from kivy.uix.button import Button

class CustomButton(Button):
def __init__(self, **kwargs):
super().__init__(**kwargs)
# self.background_down = 'atlas://textures/red-lightgrey/myatlas/button_pressed'
self.background_normal = 'atlas://textures/red-lightgrey/myatlas/button_pressed'
11 changes: 11 additions & 0 deletions Texture-atlas/after_atlas/src/components/CustomCheckBoxes.py
@@ -0,0 +1,11 @@
from kivy.uix.checkbox import CheckBox


class CustomCheckBox(CheckBox):
def __init__(self, **kwargs):
super().__init__(**kwargs)
self.background_down = 'atlas://textures/red-lightgrey/myatlas/button_pressed'
self.background_checkbox_normal = 'atlas://textures/red-lightgrey/myatlas/checkbox_off'
self.background_checkbox_down = 'atlas://textures/red-lightgrey/myatlas/checkbox_on'
self.background_checkbox_disabled_normal = 'atlas://textures/red-lightgrey/myatlas/checkbox_disabled_off'
self.background_checkbox_disabled_down = 'atlas://textures/red-lightgrey/myatlas/checkbox_disabled_on'
2 changes: 2 additions & 0 deletions Texture-atlas/after_atlas/src/components/__init__.py
@@ -0,0 +1,2 @@
from .CustomButtons import *
from .CustomCheckBoxes import *
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@@ -0,0 +1 @@
{"myatlas-0.png": {"filechooser_selected": [2, 132, 122, 122], "player-play-overlay": [126, 139, 117, 115], "textinput_disabled": [2, 19, 111, 111], "ring": [115, 22, 108, 108], "button": [225, 93, 29, 37], "button_disabled": [225, 54, 29, 37], "action_item": [225, 28, 24, 24]}, "myatlas-1.png": {"player-background": [2, 151, 103, 103], "bubble": [107, 189, 65, 65], "filechooser_file": [174, 190, 64, 64], "filechooser_folder": [2, 85, 64, 64], "textinput": [68, 85, 64, 64], "textinput_active": [134, 85, 64, 64], "textinput_disabled_active": [2, 19, 64, 64], "vkeyboard_background": [68, 19, 64, 64], "vkeyboard_disabled_background": [134, 19, 64, 64], "selector_left": [200, 87, 55, 62], "selector_middle": [200, 21, 55, 62], "tab": [107, 155, 96, 32], "switch-button": [205, 155, 43, 32], "splitter_down": [240, 222, 7, 32], "bubble_arrow": [240, 210, 16, 10]}, "myatlas-2.png": {"selector_right": [2, 192, 55, 62], "tab_disabled": [59, 222, 96, 32], "switch-background": [157, 222, 83, 32], "switch-background_disabled": [2, 158, 83, 32], "modalview-background": [2, 102, 45, 54], "audio-volume-high": [49, 108, 48, 48], "audio-volume-low": [99, 108, 48, 48], "audio-volume-medium": [149, 108, 48, 48], "audio-volume-muted": [199, 108, 48, 48], "image-missing": [2, 52, 48, 48], "media-playback-pause": [52, 52, 48, 48], "media-playback-start": [102, 52, 48, 48], "media-playback-stop": [152, 52, 48, 48], "slider_cursor": [202, 52, 48, 48], "slider_cursor_disabled": [2, 2, 48, 48], "action_group": [52, 2, 33, 48], "action_group_disabled": [87, 2, 33, 48], "action_group_down": [122, 2, 33, 48], "sliderh_background": [157, 13, 41, 37], "sliderh_background_disabled": [200, 13, 41, 37], "switch-button_disabled": [87, 158, 43, 32], "bubble_btn_pressed": [132, 158, 32, 32], "checkbox_disabled_off": [166, 158, 32, 32], "checkbox_disabled_on": [200, 158, 32, 32], "previous_normal": [234, 158, 19, 32], "tree_opened": [59, 200, 20, 20], "splitter_grip": [242, 228, 12, 26], "splitter_grip_h": [81, 208, 26, 12], "separator": [249, 108, 5, 48], "splitter": [243, 18, 7, 32], "splitter_disabled_down_h": [157, 4, 32, 7], "splitter_disabled_h": [191, 4, 32, 7], "splitter_down_h": [109, 213, 32, 7], "splitter_h": [143, 213, 32, 7]}, "myatlas-3.png": {"sliderv_background": [2, 213, 37, 41], "sliderv_background_disabled": [41, 213, 37, 41], "action_bar": [80, 218, 36, 36], "button_disabled_pressed": [2, 174, 29, 37], "button_pressed": [33, 174, 29, 37], "spinner": [64, 174, 29, 37], "spinner_disabled": [95, 174, 29, 37], "spinner_pressed": [126, 174, 29, 37], "action_item_down": [157, 179, 32, 32], "bubble_btn": [191, 179, 32, 32], "checkbox_off": [118, 222, 32, 32], "checkbox_on": [152, 222, 32, 32], "checkbox_radio_disabled_off": [186, 222, 32, 32], "checkbox_radio_disabled_on": [220, 222, 32, 32], "checkbox_radio_off": [2, 140, 32, 32], "checkbox_radio_on": [36, 140, 32, 32], "overflow": [70, 140, 32, 32], "tab_btn": [104, 140, 32, 32], "tab_btn_disabled": [138, 140, 32, 32], "tab_btn_disabled_pressed": [172, 140, 32, 32], "tab_btn_pressed": [206, 140, 32, 32], "vkeyboard_disabled_key_down": [2, 106, 32, 32], "vkeyboard_disabled_key_normal": [36, 106, 32, 32], "vkeyboard_key_down": [70, 106, 32, 32], "vkeyboard_key_normal": [104, 106, 32, 32], "progressbar": [138, 114, 32, 24], "action_view": [225, 187, 24, 24], "progressbar_background": [172, 114, 24, 24], "close": [198, 118, 20, 20], "tree_closed": [220, 118, 20, 20], "splitter_disabled": [240, 140, 7, 32], "splitter_disabled_down": [249, 140, 7, 32]}}
@@ -0,0 +1 @@
{"myatlas-0.png": {"filechooser_selected": [2, 132, 122, 122], "player-play-overlay": [126, 139, 117, 115], "textinput_disabled": [2, 19, 111, 111], "ring": [115, 22, 108, 108], "button": [225, 93, 29, 37], "button_disabled": [225, 54, 29, 37], "action_item": [225, 28, 24, 24]}, "myatlas-1.png": {"player-background": [2, 151, 103, 103], "bubble": [107, 189, 65, 65], "filechooser_file": [174, 190, 64, 64], "filechooser_folder": [2, 85, 64, 64], "textinput": [68, 85, 64, 64], "textinput_active": [134, 85, 64, 64], "textinput_disabled_active": [2, 19, 64, 64], "vkeyboard_background": [68, 19, 64, 64], "vkeyboard_disabled_background": [134, 19, 64, 64], "selector_left": [200, 87, 55, 62], "selector_middle": [200, 21, 55, 62], "tab": [107, 155, 96, 32], "switch-button": [205, 155, 43, 32], "splitter_down": [240, 222, 7, 32], "bubble_arrow": [240, 210, 16, 10]}, "myatlas-2.png": {"selector_right": [2, 192, 55, 62], "tab_disabled": [59, 222, 96, 32], "switch-background": [157, 222, 83, 32], "switch-background_disabled": [2, 158, 83, 32], "modalview-background": [2, 102, 45, 54], "audio-volume-high": [49, 108, 48, 48], "audio-volume-low": [99, 108, 48, 48], "audio-volume-medium": [149, 108, 48, 48], "audio-volume-muted": [199, 108, 48, 48], "image-missing": [2, 52, 48, 48], "media-playback-pause": [52, 52, 48, 48], "media-playback-start": [102, 52, 48, 48], "media-playback-stop": [152, 52, 48, 48], "slider_cursor": [202, 52, 48, 48], "slider_cursor_disabled": [2, 2, 48, 48], "action_group": [52, 2, 33, 48], "action_group_disabled": [87, 2, 33, 48], "action_group_down": [122, 2, 33, 48], "sliderh_background": [157, 13, 41, 37], "sliderh_background_disabled": [200, 13, 41, 37], "switch-button_disabled": [87, 158, 43, 32], "bubble_btn_pressed": [132, 158, 32, 32], "checkbox_disabled_off": [166, 158, 32, 32], "checkbox_disabled_on": [200, 158, 32, 32], "previous_normal": [234, 158, 19, 32], "tree_opened": [59, 200, 20, 20], "splitter_grip": [242, 228, 12, 26], "splitter_grip_h": [81, 208, 26, 12], "separator": [249, 108, 5, 48], "splitter": [243, 18, 7, 32], "splitter_disabled_down_h": [157, 4, 32, 7], "splitter_disabled_h": [191, 4, 32, 7], "splitter_down_h": [109, 213, 32, 7], "splitter_h": [143, 213, 32, 7]}, "myatlas-3.png": {"sliderv_background": [2, 213, 37, 41], "sliderv_background_disabled": [41, 213, 37, 41], "action_bar": [80, 218, 36, 36], "button_disabled_pressed": [2, 174, 29, 37], "button_pressed": [33, 174, 29, 37], "spinner": [64, 174, 29, 37], "spinner_disabled": [95, 174, 29, 37], "spinner_pressed": [126, 174, 29, 37], "action_item_down": [157, 179, 32, 32], "bubble_btn": [191, 179, 32, 32], "checkbox_off": [118, 222, 32, 32], "checkbox_on": [152, 222, 32, 32], "checkbox_radio_disabled_off": [186, 222, 32, 32], "checkbox_radio_disabled_on": [220, 222, 32, 32], "checkbox_radio_off": [2, 140, 32, 32], "checkbox_radio_on": [36, 140, 32, 32], "overflow": [70, 140, 32, 32], "tab_btn": [104, 140, 32, 32], "tab_btn_disabled": [138, 140, 32, 32], "tab_btn_disabled_pressed": [172, 140, 32, 32], "tab_btn_pressed": [206, 140, 32, 32], "vkeyboard_disabled_key_down": [2, 106, 32, 32], "vkeyboard_disabled_key_normal": [36, 106, 32, 32], "vkeyboard_key_down": [70, 106, 32, 32], "vkeyboard_key_normal": [104, 106, 32, 32], "progressbar": [138, 114, 32, 24], "action_view": [225, 187, 24, 24], "progressbar_background": [172, 114, 24, 24], "close": [198, 118, 20, 20], "tree_closed": [220, 118, 20, 20], "splitter_disabled": [240, 140, 7, 32], "splitter_disabled_down": [249, 140, 7, 32]}}
@@ -0,0 +1 @@
{"myatlas-0.png": {"filechooser_selected": [2, 132, 122, 122], "player-play-overlay": [126, 139, 117, 115], "textinput_disabled": [2, 19, 111, 111], "ring": [115, 22, 108, 108], "button": [225, 93, 29, 37], "button_disabled": [225, 54, 29, 37], "action_item": [225, 28, 24, 24]}, "myatlas-1.png": {"player-background": [2, 151, 103, 103], "bubble": [107, 189, 65, 65], "filechooser_file": [174, 190, 64, 64], "filechooser_folder": [2, 85, 64, 64], "textinput": [68, 85, 64, 64], "textinput_active": [134, 85, 64, 64], "textinput_disabled_active": [2, 19, 64, 64], "vkeyboard_background": [68, 19, 64, 64], "vkeyboard_disabled_background": [134, 19, 64, 64], "selector_left": [200, 87, 55, 62], "selector_middle": [200, 21, 55, 62], "tab": [107, 155, 96, 32], "switch-button": [205, 155, 43, 32], "splitter_down": [240, 222, 7, 32], "bubble_arrow": [240, 210, 16, 10]}, "myatlas-2.png": {"selector_right": [2, 192, 55, 62], "tab_disabled": [59, 222, 96, 32], "switch-background": [157, 222, 83, 32], "switch-background_disabled": [2, 158, 83, 32], "modalview-background": [2, 102, 45, 54], "audio-volume-high": [49, 108, 48, 48], "audio-volume-low": [99, 108, 48, 48], "audio-volume-medium": [149, 108, 48, 48], "audio-volume-muted": [199, 108, 48, 48], "image-missing": [2, 52, 48, 48], "media-playback-pause": [52, 52, 48, 48], "media-playback-start": [102, 52, 48, 48], "media-playback-stop": [152, 52, 48, 48], "slider_cursor": [202, 52, 48, 48], "slider_cursor_disabled": [2, 2, 48, 48], "action_group": [52, 2, 33, 48], "action_group_disabled": [87, 2, 33, 48], "action_group_down": [122, 2, 33, 48], "sliderh_background": [157, 13, 41, 37], "sliderh_background_disabled": [200, 13, 41, 37], "switch-button_disabled": [87, 158, 43, 32], "bubble_btn_pressed": [132, 158, 32, 32], "checkbox_disabled_off": [166, 158, 32, 32], "checkbox_disabled_on": [200, 158, 32, 32], "previous_normal": [234, 158, 19, 32], "tree_opened": [59, 200, 20, 20], "splitter_grip": [242, 228, 12, 26], "splitter_grip_h": [81, 208, 26, 12], "separator": [249, 108, 5, 48], "splitter": [243, 18, 7, 32], "splitter_disabled_down_h": [157, 4, 32, 7], "splitter_disabled_h": [191, 4, 32, 7], "splitter_down_h": [109, 213, 32, 7], "splitter_h": [143, 213, 32, 7]}, "myatlas-3.png": {"sliderv_background": [2, 213, 37, 41], "sliderv_background_disabled": [41, 213, 37, 41], "action_bar": [80, 218, 36, 36], "button_disabled_pressed": [2, 174, 29, 37], "button_pressed": [33, 174, 29, 37], "spinner": [64, 174, 29, 37], "spinner_disabled": [95, 174, 29, 37], "spinner_pressed": [126, 174, 29, 37], "action_item_down": [157, 179, 32, 32], "bubble_btn": [191, 179, 32, 32], "checkbox_off": [118, 222, 32, 32], "checkbox_on": [152, 222, 32, 32], "checkbox_radio_disabled_off": [186, 222, 32, 32], "checkbox_radio_disabled_on": [220, 222, 32, 32], "checkbox_radio_off": [2, 140, 32, 32], "checkbox_radio_on": [36, 140, 32, 32], "overflow": [70, 140, 32, 32], "tab_btn": [104, 140, 32, 32], "tab_btn_disabled": [138, 140, 32, 32], "tab_btn_disabled_pressed": [172, 140, 32, 32], "tab_btn_pressed": [206, 140, 32, 32], "vkeyboard_disabled_key_down": [2, 106, 32, 32], "vkeyboard_disabled_key_normal": [36, 106, 32, 32], "vkeyboard_key_down": [70, 106, 32, 32], "vkeyboard_key_normal": [104, 106, 32, 32], "progressbar": [138, 114, 32, 24], "action_view": [225, 187, 24, 24], "progressbar_background": [172, 114, 24, 24], "close": [198, 118, 20, 20], "tree_closed": [220, 118, 20, 20], "splitter_disabled": [240, 140, 7, 32], "splitter_disabled_down": [249, 140, 7, 32]}}
18 changes: 18 additions & 0 deletions Texture-atlas/before_atlas/main.kv
@@ -0,0 +1,18 @@
<Theming>:
spacing: 50
padding: 10, 10
CustomButton:
text: "Button"
BoxLayout:
orientation: "vertical"
ProgressBar:
value: 25
ProgressBar:
value: 50
ProgressBar:
value: 75
BoxLayout:
orientation: "vertical"
CustomCheckBox:
CustomCheckBox:
CustomCheckBox:
23 changes: 23 additions & 0 deletions Texture-atlas/before_atlas/main.py
@@ -0,0 +1,23 @@
#!/usr/bin/env python3

from kivy.app import App
from kivy.uix.boxlayout import BoxLayout
from kivy.properties import OptionProperty

from src.components import CustomButton, CustomCheckBox


class Theming(BoxLayout):
pass


class MainApp(App):

def build(self):
self.title = 'Theming'
return Theming()


if __name__ == "__main__":
app = MainApp()
app.run()
6 changes: 6 additions & 0 deletions Texture-atlas/before_atlas/src/components/CustomButtons.py
@@ -0,0 +1,6 @@
from kivy.uix.button import Button

class CustomButton(Button):
def __init__(self, **kwargs):
super().__init__(**kwargs)

6 changes: 6 additions & 0 deletions Texture-atlas/before_atlas/src/components/CustomCheckBoxes.py
@@ -0,0 +1,6 @@
from kivy.uix.checkbox import CheckBox


class CustomCheckBox(CheckBox):
def __init__(self, **kwargs):
super().__init__(**kwargs)
2 changes: 2 additions & 0 deletions Texture-atlas/before_atlas/src/components/__init__.py
@@ -0,0 +1,2 @@
from .CustomButtons import *
from .CustomCheckBoxes import *

0 comments on commit a017ccb

Please sign in to comment.