Replace netbook mode with sizing proportional to screen size
svn: r18374
This commit is contained in:
@@ -39,7 +39,7 @@ class CalendarGramplet(Gramplet):
|
||||
self.set_tooltip(_("Double-click a day for details"))
|
||||
self.gui.calendar = gtk.Calendar()
|
||||
self.gui.calendar.connect('day-selected-double-click', self.double_click)
|
||||
if self.uistate.netbook_mode():
|
||||
if self.uistate.screen_width() <= 1024:
|
||||
self.gui.calendar.set_display_options(gtk.CALENDAR_SHOW_HEADING)
|
||||
self.gui.get_container_widget().remove(self.gui.textview)
|
||||
self.gui.get_container_widget().add_with_viewport(self.gui.calendar)
|
||||
|
||||
@@ -61,7 +61,7 @@ class Gallery(Gramplet):
|
||||
full_path = Utils.media_path_full(self.dbstate.db, media.get_path())
|
||||
mime_type = media.get_mime_type()
|
||||
if mime_type and mime_type.startswith("image"):
|
||||
photo = Photo(self.uistate.netbook_mode())
|
||||
photo = Photo(self.uistate.screen_height() < 1000)
|
||||
photo.set_image(full_path, mime_type, media_ref.get_rectangle())
|
||||
self.image_list.append(photo)
|
||||
self.top.pack_start(photo, expand=False, fill=False)
|
||||
|
||||
@@ -38,7 +38,7 @@ class MediaPreview(Gramplet):
|
||||
Build the GUI interface.
|
||||
"""
|
||||
self.top = gtk.HBox()
|
||||
self.photo = Photo(self.uistate.netbook_mode())
|
||||
self.photo = Photo(self.uistate.screen_height() < 1000)
|
||||
self.top.pack_start(self.photo, fill=True, expand=False, padding=5)
|
||||
self.top.show_all()
|
||||
return self.top
|
||||
|
||||
@@ -45,7 +45,7 @@ class PersonDetails(Gramplet):
|
||||
"""
|
||||
self.top = gtk.HBox()
|
||||
vbox = gtk.VBox()
|
||||
self.photo = Photo(self.uistate.netbook_mode())
|
||||
self.photo = Photo(self.uistate.screen_height() < 1000)
|
||||
self.photo.show()
|
||||
self.name = gtk.Label()
|
||||
self.name.set_alignment(0, 0)
|
||||
|
||||
@@ -42,7 +42,7 @@ class PlaceDetails(Gramplet):
|
||||
"""
|
||||
self.top = gtk.HBox()
|
||||
vbox = gtk.VBox()
|
||||
self.photo = Photo(self.uistate.netbook_mode())
|
||||
self.photo = Photo(self.uistate.screen_height() < 1000)
|
||||
self.title = gtk.Label()
|
||||
self.title.set_alignment(0, 0)
|
||||
self.title.modify_font(pango.FontDescription('sans bold 12'))
|
||||
|
||||
Reference in New Issue
Block a user