Merge pull request #2442 from kived/fix-tabs-spaces

fix mixed spaces/tabs
This commit is contained in:
Ryan Pessa 2014-08-30 16:55:44 -05:00
commit 436f2d6b26
3 changed files with 181 additions and 181 deletions

View File

@ -2,7 +2,7 @@
#:import kivy kivy
<AudioBackground>:
orientation: 'vertical'
orientation: 'vertical'
canvas:
Color:
rgb: 1, 1, 1
@ -10,43 +10,43 @@
source: 'data/images/background.jpg'
size: self.size
BoxLayout:
padding: 10
spacing: 10
size_hint: 1, None
pos_hint: {'top': 1}
height: 44
Image:
size_hint: None, None
size: 24, 24
source: 'data/logo/kivy-icon-24.png'
Label:
height: 24
text_size: self.size
color: (1, 1, 1, .8)
text: 'Kivy %s - Audio sample' % kivy.__version__
valign: 'middle'
BoxLayout:
padding: 10
spacing: 10
size_hint: 1, None
pos_hint: {'top': 1}
height: 44
Image:
size_hint: None, None
size: 24, 24
source: 'data/logo/kivy-icon-24.png'
Label:
height: 24
text_size: self.size
color: (1, 1, 1, .8)
text: 'Kivy %s - Audio sample' % kivy.__version__
valign: 'middle'
Label:
text: 'Audio example'
font_size: 32
size_hint_y: None
Label:
text: 'Audio example'
font_size: 32
size_hint_y: None
BoxLayout:
Slider:
min: 0.0
max: 1.0
value: 1.0
on_value: app.set_volume(self.value)
orientation: "vertical"
size_hint_x: None
width: "48dp"
BoxLayout:
Slider:
min: 0.0
max: 1.0
value: 1.0
on_value: app.set_volume(self.value)
orientation: "vertical"
size_hint_x: None
width: "48dp"
StackLayout:
id: sl
StackLayout:
id: sl
Button:
text: 'Stop and release all audio'
size_hint_y: None
height: '50sp'
on_press: app.release_audio()
Button:
text: 'Stop and release all audio'
size_hint_y: None
height: '50sp'
on_press: app.release_audio()

View File

@ -519,8 +519,8 @@
# =============================================================================
<ActionBar>:
height: '48dp'
size_hint_y: None
height: '48dp'
size_hint_y: None
spacing: '4dp'
canvas:
Color:
@ -553,27 +553,27 @@
<ActionButton,ActionToggleButton>:
background_normal: 'atlas://data/images/defaulttheme/' + ('action_bar' if self.inside_group else 'action_item')
background_down: 'atlas://data/images/defaulttheme/action_item_down'
size_hint_x: None if not root.inside_group else 1
width: [dp(48) if (root.icon and not root.inside_group) else max(dp(48), (self.texture_size[0] + dp(32))), self.size_hint_x][0]
color: self.color[:3] + [0 if (root.icon and not root.inside_group) else 1]
background_down: 'atlas://data/images/defaulttheme/action_item_down'
size_hint_x: None if not root.inside_group else 1
width: [dp(48) if (root.icon and not root.inside_group) else max(dp(48), (self.texture_size[0] + dp(32))), self.size_hint_x][0]
color: self.color[:3] + [0 if (root.icon and not root.inside_group) else 1]
Image:
opacity: 1 if (root.icon and not root.inside_group) else 0
source: root.icon
Image:
opacity: 1 if (root.icon and not root.inside_group) else 0
source: root.icon
mipmap: root.mipmap
pos: root.x + dp(4), root.y + dp(4)
size: root.width - dp(8), root.height - sp(8)
pos: root.x + dp(4), root.y + dp(4)
size: root.width - dp(8), root.height - sp(8)
<ActionGroup>:
size_hint_x: None
width: self.texture_size[0] + dp(32)
size_hint_x: None
width: self.texture_size[0] + dp(32)
<ActionCheck>:
background_normal: 'atlas://data/images/defaulttheme/action_bar' if self.inside_group else 'atlas://data/images/defaulttheme/action_item'
<ActionPrevious>:
size_hint_x: 1
size_hint_x: 1
minimum_width: '100sp'
important: True
BoxLayout:
@ -592,10 +592,10 @@
allow_stretch: True
size_hint_x: None
width: min(self.height, self.texture_size[0]) if self.texture else self.height
mipmap: root.mipmap
Widget:
size_hint_x: None
width: '5sp'
mipmap: root.mipmap
Widget:
size_hint_x: None
width: '5sp'
Label:
text: root.title
text_size: self.size
@ -624,8 +624,8 @@
minimum_width: '48sp'
width: self.texture_size[0] if self.texture else self.minimum_width
canvas.after:
Color:
rgb: 1, 1, 1
Color:
rgb: 1, 1, 1
Rectangle:
pos: root.center_x - sp(16), root.center_y - sp(16)
size: sp(32), sp(32)
@ -1050,33 +1050,33 @@
<ColorPicker_Label@Label>
mroot: None
size_hint_x: None
width: '30sp'
size_hint_x: None
width: '30sp'
text_size: self.size
halign: "center"
valign: "middle"
<ColorPicker_Selector@BoxLayout>
foreground_color: None
foreground_color: None
text: ''
mroot: None
mode: 'rgb'
color: 0
spacing: '2sp'
ColorPicker_Label:
text: root.text
mroot: root.mroot
color: root.foreground_color or (1, 1, 1, 1)
AnchorLayout:
size_hint_x: None
width: '50sp'
ColorPicker_Input:
mroot: root.mroot
text: str(int(sldr.value))
size_hint_y: None
height: '28sp'
on_text:
root.mroot._trigger_update_clr(root.mode, root.clr_idx, args[1])
ColorPicker_Label:
text: root.text
mroot: root.mroot
color: root.foreground_color or (1, 1, 1, 1)
AnchorLayout:
size_hint_x: None
width: '50sp'
ColorPicker_Input:
mroot: root.mroot
text: str(int(sldr.value))
size_hint_y: None
height: '28sp'
on_text:
root.mroot._trigger_update_clr(root.mode, root.clr_idx, args[1])
Slider:
id: sldr
size_hint: 1, .25
@ -1087,15 +1087,15 @@
root.mroot._trigger_update_clr(root.mode, root.clr_idx, args[1])
<ColorPicker>:
foreground_color: (1, 1, 1, 1) if self.hsv[2] * wheel.a < .5 else (0, 0, 0, 1)
foreground_color: (1, 1, 1, 1) if self.hsv[2] * wheel.a < .5 else (0, 0, 0, 1)
wheel: wheel
BoxLayout:
orientation: 'vertical' if root.width < root.height else 'horizontal'
spacing: '5sp'
StackLayout:
orientation: 'tb-lr'
size_hint_y: None if root.width < root.height else 1
height: sp(33) * 4 if root.width < root.height else self.height
orientation: 'tb-lr'
size_hint_y: None if root.width < root.height else 1
height: sp(33) * 4 if root.width < root.height else self.height
canvas:
Color:
rgba: root.color
@ -1103,96 +1103,96 @@
size: self.size
pos: self.pos
ColorPicker_Selector:
mroot: root
text: 'R'
clr_idx: 0
color: wheel.r
foreground_color: root.foreground_color
size_hint_y: None if root.width < root.height else 0.125
size_hint_x: .5 if root.width < root.height else 1
height: '33sp' if root.width < root.height else self.height
ColorPicker_Selector:
mroot: root
text: 'R'
clr_idx: 0
color: wheel.r
foreground_color: root.foreground_color
size_hint_y: None if root.width < root.height else 0.125
size_hint_x: .5 if root.width < root.height else 1
height: '33sp' if root.width < root.height else self.height
ColorPicker_Selector:
mroot: root
text: 'G'
clr_idx: 1
color: wheel.g
foreground_color: root.foreground_color
size_hint_y: None if root.width < root.height else 0.125
size_hint_x: .5 if root.width < root.height else 1
height: '33sp' if root.width < root.height else self.height
ColorPicker_Selector:
mroot: root
text: 'G'
clr_idx: 1
color: wheel.g
foreground_color: root.foreground_color
size_hint_y: None if root.width < root.height else 0.125
size_hint_x: .5 if root.width < root.height else 1
height: '33sp' if root.width < root.height else self.height
ColorPicker_Selector:
mroot: root
text: 'B'
clr_idx: 2
color: wheel.b
foreground_color: root.foreground_color
size_hint_y: None if root.width < root.height else 0.125
size_hint_x: .5 if root.width < root.height else 1
height: '33sp' if root.width < root.height else self.height
ColorPicker_Selector:
mroot: root
text: 'B'
clr_idx: 2
color: wheel.b
foreground_color: root.foreground_color
size_hint_y: None if root.width < root.height else 0.125
size_hint_x: .5 if root.width < root.height else 1
height: '33sp' if root.width < root.height else self.height
ColorPicker_Selector:
mroot: root
text: 'A'
clr_idx: 3
color: root.color[3]
foreground_color: root.foreground_color
size_hint_y: None if root.width < root.height else 0.125
size_hint_x: .5 if root.width < root.height else 1
height: '33sp' if root.width < root.height else self.height
ColorPicker_Selector:
mroot: root
text: 'A'
clr_idx: 3
color: root.color[3]
foreground_color: root.foreground_color
size_hint_y: None if root.width < root.height else 0.125
size_hint_x: .5 if root.width < root.height else 1
height: '33sp' if root.width < root.height else self.height
ColorPicker_Selector:
mroot: root
mode: 'hsv'
text: 'H'
clr_idx: 0
color: root.hsv[0]
foreground_color: root.foreground_color
size_hint_y: None if root.width < root.height else 0.125
size_hint_x: .5 if root.width < root.height else 1
height: '33sp' if root.width < root.height else self.height
ColorPicker_Selector:
mroot: root
mode: 'hsv'
text: 'H'
clr_idx: 0
color: root.hsv[0]
foreground_color: root.foreground_color
size_hint_y: None if root.width < root.height else 0.125
size_hint_x: .5 if root.width < root.height else 1
height: '33sp' if root.width < root.height else self.height
ColorPicker_Selector:
mroot: root
mode: 'hsv'
text: 'S'
clr_idx: 1
color: root.hsv[1]
foreground_color: root.foreground_color
size_hint_y: None if root.width < root.height else 0.125
size_hint_x: .5 if root.width < root.height else 1
height: '33sp' if root.width < root.height else self.height
ColorPicker_Selector:
mroot: root
mode: 'hsv'
text: 'S'
clr_idx: 1
color: root.hsv[1]
foreground_color: root.foreground_color
size_hint_y: None if root.width < root.height else 0.125
size_hint_x: .5 if root.width < root.height else 1
height: '33sp' if root.width < root.height else self.height
ColorPicker_Selector:
mroot: root
mode: 'hsv'
text: 'V'
clr_idx: 2
color: root.hsv[2]
foreground_color: root.foreground_color
size_hint_y: None if root.width < root.height else 0.125
size_hint_x: .5 if root.width < root.height else 1
height: '33sp' if root.width < root.height else self.height
ColorPicker_Selector:
mroot: root
mode: 'hsv'
text: 'V'
clr_idx: 2
color: root.hsv[2]
foreground_color: root.foreground_color
size_hint_y: None if root.width < root.height else 0.125
size_hint_x: .5 if root.width < root.height else 1
height: '33sp' if root.width < root.height else self.height
BoxLayout:
size_hint_y: None if root.width < root.height else 0.125
size_hint_x: .5 if root.width < root.height else 1
height: '33sp' if root.width < root.height else self.height
BoxLayout:
size_hint_y: None if root.width < root.height else 0.125
size_hint_x: .5 if root.width < root.height else 1
height: '33sp' if root.width < root.height else self.height
spacing: '2sp'
ColorPicker_Label:
mroot: root
text: 'X'
color: root.foreground_color
AnchorLayout:
ColorPicker_Input:
size_hint_y: None
height: '28sp'
mroot: root
text: str(root.hex_color)
on_text: root._trigger_update_hex(args[1])
spacing: '2sp'
ColorPicker_Label:
mroot: root
text: 'X'
color: root.foreground_color
AnchorLayout:
ColorPicker_Input:
size_hint_y: None
height: '28sp'
mroot: root
text: str(root.hex_color)
on_text: root._trigger_update_hex(args[1])
ColorWheel:

View File

@ -27,51 +27,51 @@ cdef extern from "/opt/vc/include/EGL/egl.h":
EGLBoolean eglTerminate(EGLDisplay dpy)
char * eglQueryString(EGLDisplay dpy, EGLint name)
EGLBoolean eglGetConfigs(EGLDisplay dpy, EGLConfig *configs,
EGLint config_size, EGLint *num_config)
EGLint config_size, EGLint *num_config)
EGLBoolean eglChooseConfig(EGLDisplay dpy, EGLint *attrib_list,
EGLConfig *configs, EGLint config_size,
EGLint *num_config)
EGLConfig *configs, EGLint config_size,
EGLint *num_config)
EGLBoolean eglGetConfigAttrib(EGLDisplay dpy, EGLConfig config,
EGLint attribute, EGLint *value)
EGLint attribute, EGLint *value)
EGLSurface eglCreateWindowSurface(EGLDisplay dpy, EGLConfig config,
EGLNativeWindowType win,
EGLint *attrib_list)
EGLNativeWindowType win,
EGLint *attrib_list)
EGLSurface eglCreatePbufferSurface(EGLDisplay dpy, EGLConfig config,
EGLint *attrib_list)
EGLint *attrib_list)
EGLSurface eglCreatePixmapSurface(EGLDisplay dpy, EGLConfig config,
EGLNativePixmapType pixmap,
EGLint *attrib_list)
EGLNativePixmapType pixmap,
EGLint *attrib_list)
EGLBoolean eglDestroySurface(EGLDisplay dpy, EGLSurface surface)
EGLBoolean eglQuerySurface(EGLDisplay dpy, EGLSurface surface,
EGLint attribute, EGLint *value)
EGLint attribute, EGLint *value)
EGLBoolean eglBindAPI(EGLenum api)
EGLenum eglQueryAPI()
EGLBoolean eglWaitClient()
EGLBoolean eglReleaseThread()
EGLSurface eglCreatePbufferFromClientBuffer(
EGLDisplay dpy, EGLenum buftype, EGLClientBuffer buffer,
EGLConfig config, EGLint *attrib_list)
EGLDisplay dpy, EGLenum buftype, EGLClientBuffer buffer,
EGLConfig config, EGLint *attrib_list)
EGLBoolean eglSurfaceAttrib(EGLDisplay dpy, EGLSurface surface,
EGLint attribute, EGLint value)
EGLint attribute, EGLint value)
EGLBoolean eglBindTexImage(EGLDisplay dpy, EGLSurface surface, EGLint buffer)
EGLBoolean eglReleaseTexImage(EGLDisplay dpy, EGLSurface surface, EGLint buffer)
EGLBoolean eglSwapInterval(EGLDisplay dpy, EGLint interval)
EGLContext eglCreateContext(EGLDisplay dpy, EGLConfig config,
EGLContext share_context,
EGLint *attrib_list)
EGLContext share_context,
EGLint *attrib_list)
EGLBoolean eglDestroyContext(EGLDisplay dpy, EGLContext ctx)
EGLBoolean eglMakeCurrent(EGLDisplay dpy, EGLSurface draw,
EGLSurface read, EGLContext ctx)
EGLSurface read, EGLContext ctx)
EGLContext eglGetCurrentContext()
EGLSurface eglGetCurrentSurface(EGLint readdraw)
EGLDisplay eglGetCurrentDisplay()
EGLBoolean eglQueryContext(EGLDisplay dpy, EGLContext ctx,
EGLint attribute, EGLint *value)
EGLint attribute, EGLint *value)
EGLBoolean eglWaitGL()
EGLBoolean eglWaitNative(EGLint engine)
EGLBoolean eglSwapBuffers(EGLDisplay dpy, EGLSurface surface)
EGLBoolean eglCopyBuffers(EGLDisplay dpy, EGLSurface surface,
EGLNativePixmapType target)
EGLNativePixmapType target)
class _constants:
EGL_VERSION_1_0 = 1 #
@ -400,7 +400,7 @@ def ChooseConfig(Display dpy, list attrib_list, EGLint config_size):
def GetConfigAttrib(Display dpy, Config config, EGLint attribute):
cdef EGLint value
if eglGetConfigAttrib(dpy._egldisplay, config._eglconfig,
attribute, &value) == EGL_FALSE:
attribute, &value) == EGL_FALSE:
raise_egl_error()
return int(value)
@ -480,7 +480,7 @@ def DestroySurface(Display dpy, Surface surf):
def QuerySurface(Display dpy, Surface surf, EGLint attrib):
cdef EGLint ret
if eglQuerySurface(dpy._egldisplay, surf._eglsurface,
attrib, &ret) == EGL_FALSE:
attrib, &ret) == EGL_FALSE:
raise_egl_error()
return ret
@ -557,7 +557,7 @@ def DestroyContext(Display dpy, Context ctx):
def MakeCurrent(Display dpy, Surface draw, Surface read, Context ctx):
if eglMakeCurrent(dpy._egldisplay, draw._eglsurface,
read._eglsurface, ctx._eglcontext) == EGL_FALSE:
read._eglsurface, ctx._eglcontext) == EGL_FALSE:
raise_egl_error()
def GetCurrentContext():