Smaller header buttons
I can scale down the 6 sided die image better than the old 20 sided die, so it is ok to make the header images smaller.
This commit is contained in:
parent
646fc59c5c
commit
cfd30e8eac
BIN
images/dice.png
BIN
images/dice.png
Binary file not shown.
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 19 KiB |
Binary file not shown.
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 988 B |
|
@ -9,10 +9,10 @@ invite = LS.event.invite
|
|||
|
||||
|
||||
class Button(gtk.Button):
|
||||
def __init__(self, stock, size=gtk.ICON_SIZE_MENU, func=None, show=True):
|
||||
def __init__(self, stock, func=None, show=True):
|
||||
gtk.Button.__init__(self)
|
||||
self.func = func
|
||||
img = gtk.image_new_from_stock(stock, size)
|
||||
img = gtk.image_new_from_stock(stock, gtk.ICON_SIZE_MENU)
|
||||
img.show()
|
||||
self.add(img)
|
||||
self.set_relief(gtk.RELIEF_NONE)
|
||||
|
@ -91,28 +91,28 @@ class RewindButton(Button):
|
|||
|
||||
class OpenButton(Button):
|
||||
def __init__(self):
|
||||
Button.__init__(self, gtk.STOCK_OPEN, gtk.ICON_SIZE_BUTTON)
|
||||
Button.__init__(self, gtk.STOCK_OPEN)
|
||||
def clicked(self, button):
|
||||
from ocarina import fsselect
|
||||
fsselect.run_chooser2(LS.path.files.universal_open)
|
||||
|
||||
class ClearButton(Button):
|
||||
def __init__(self):
|
||||
Button.__init__(self, gtk.STOCK_CLEAR, gtk.ICON_SIZE_BUTTON)
|
||||
Button.__init__(self, gtk.STOCK_CLEAR)
|
||||
def clicked(self, button):
|
||||
from ocarina import body
|
||||
body.cur_page_reset()
|
||||
|
||||
class ExportButton(Button):
|
||||
def __init__(self):
|
||||
Button.__init__(self, gtk.STOCK_CONVERT, gtk.ICON_SIZE_BUTTON)
|
||||
Button.__init__(self, gtk.STOCK_CONVERT)
|
||||
def clicked(self, button):
|
||||
from libsaria.path import backup
|
||||
backup.backup()
|
||||
|
||||
class GotoButton(Button):
|
||||
def __init__(self):
|
||||
Button.__init__(self, gtk.STOCK_JUMP_TO, gtk.ICON_SIZE_BUTTON)
|
||||
Button.__init__(self, gtk.STOCK_JUMP_TO)
|
||||
def clicked(self, button):
|
||||
from ocarina import body
|
||||
body.cur_page_goto()
|
||||
|
@ -165,7 +165,7 @@ class VolumeButton(gtk.VolumeButton):
|
|||
def resize(self):
|
||||
image = self.get_children()[0]
|
||||
icon = image.get_icon_name()[0]
|
||||
image.set_from_icon_name(icon, gtk.ICON_SIZE_BUTTON)
|
||||
image.set_from_icon_name(icon, gtk.ICON_SIZE_MENU)
|
||||
|
||||
def changed(self, widget, value):
|
||||
LS.controls.set_volume(value)
|
||||
|
|
Loading…
Reference in New Issue