Fixup icons in python about dialogs
This commit is contained in:
parent
6187868ba0
commit
e7ee6ab948
@ -24,7 +24,7 @@ class AboutAppletWindow(yutani.Window):
|
||||
super(AboutAppletWindow, self).__init__(self.base_width + decorator.width(), self.base_height + decorator.height(), title=title, icon=icon, doublebuffer=True)
|
||||
self.move(int((yutani.yutani_ctx._ptr.contents.display_width-self.width)/2),int((yutani.yutani_ctx._ptr.contents.display_height-self.height)/2))
|
||||
self.decorator = decorator
|
||||
#self.logo = cairo.ImageSurface.create_from_png(logo)
|
||||
self.logo = yutani.Sprite.from_file(logo).get_cairo_surface()
|
||||
self.font = toaru_fonts.Font(toaru_fonts.FONT_SANS_SERIF, 13, 0xFF000000)
|
||||
self.tr = text_region.TextRegion(0,0,self.base_width-30,self.base_height-self.text_offset,font=self.font)
|
||||
self.tr.set_alignment(2)
|
||||
@ -43,8 +43,8 @@ class AboutAppletWindow(yutani.Window):
|
||||
ctx.set_source_rgb(204/255,204/255,204/255)
|
||||
ctx.fill()
|
||||
|
||||
#ctx.set_source_surface(self.logo,int((WIDTH-self.logo.get_width())/2),10+int((84-self.logo.get_height())/2))
|
||||
#ctx.paint()
|
||||
ctx.set_source_surface(self.logo,int((WIDTH-self.logo.get_width())/2),10+int((84-self.logo.get_height())/2))
|
||||
ctx.paint()
|
||||
|
||||
self.tr.resize(WIDTH-30,HEIGHT-self.text_offset)
|
||||
self.tr.move(self.decorator.left_width() + 15,self.decorator.top_height()+self.text_offset)
|
||||
|
@ -259,7 +259,7 @@ class ClockWindow(yutani.Window):
|
||||
sys.exit(0)
|
||||
|
||||
def about(self, data=None):
|
||||
AboutAppletWindow(d,f"About {app_name}","/usr/share/icons/48/clock.png",_description,"clock")
|
||||
AboutAppletWindow(d,f"About {app_name}","/usr/share/icons/48/clock.bmp",_description,"clock")
|
||||
|
||||
def mouse_event(self, msg):
|
||||
# drag start
|
||||
|
Loading…
Reference in New Issue
Block a user