Skip to content

Commit

Permalink
- Small change to where appindicator menu pops up.
Browse files Browse the repository at this point in the history
- App indicator icon size is set to 18 instead of 16.
  • Loading branch information
Matias Särs committed Oct 20, 2012
1 parent 1f2c5c7 commit d7d597e
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions dockx_applets/appindicator.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@
DBusGMainLoop(set_as_default=True)
BUS = dbus.SessionBus()

ICONSIZE = 18

class AppIndicator(gtk.EventBox):
def __init__(self, applet, icon_name, position, address, obj,
icon_path, label, labelguide, accessibledesc, hint, title):
Expand Down Expand Up @@ -106,13 +108,13 @@ def on_icon_changed(self, icon_name=None, icon_desc=None):
self.icon_name = icon_name
if self.icon_name.startswith("/") and os.path.exists(self.icon_name):
pixbuf = gtk.gdk.pixbuf_new_from_file_at_size(self.icon_name,
16, 16)
ICONSIZE, ICONSIZE)
else:
icon_theme = gtk.icon_theme_get_default()
if self.icon_themepath != "" and \
os.path.exists(self.icon_themepath):
icon_theme.prepend_search_path(self.icon_themepath)
pixbuf = icon_theme.load_icon(self.icon_name, 16, 0)
pixbuf = icon_theme.load_icon(self.icon_name, ICONSIZE, 0)
self.icon.set_from_pixbuf(pixbuf)

def on_icon_themepath_changed(self, path):
Expand Down Expand Up @@ -143,9 +145,9 @@ def position_menu(self, menu):
y -= h
screen = self.get_window().get_screen()
if y + h > screen.get_height():
y -= h - a.height
y = screen.get_height() - h
if x + w >= screen.get_width():
x -= w - a.width
x = screen.get_width() - w
return (x, y, False)

class AppIndicatorApplet(DockXApplet):
Expand Down

0 comments on commit d7d597e

Please sign in to comment.