Python 3.x Python,Gtk3:如何修改进度条的高度
我有一个python-gtk3应用程序(),它使用一个进度条(我在这里只放了相关的代码): 进度条显示的高度为一些像素,您几乎看不到它 我怎样才能让它更高Python 3.x Python,Gtk3:如何修改进度条的高度,python-3.x,gtk3,Python 3.x,Gtk3,我有一个python-gtk3应用程序(),它使用一个进度条(我在这里只放了相关的代码): 进度条显示的高度为一些像素,您几乎看不到它 我怎样才能让它更高 @singleton class Widgets(Builder): """Tweak the GtkBuilder results specifically for the main window.""" message_timeout_source = None
@singleton
class Widgets(Builder):
"""Tweak the GtkBuilder results specifically for the main window."""
message_timeout_source = None
defer_select = False
def __init__(self):
Builder.__init__(self)
def redraw_interface(self, fraction=None, text=None):
"""Tell Gtk to redraw the user interface, so it doesn't look hung.
Primarily for updating the progressbar, but won't touch it if called
with no arguments.
"""
if fraction is not None:
self.progressbar.set_fraction(fraction)
if text is not None:
self.progressbar.set_text(str(text))
while Gtk.events_pending():
Gtk.main_iteration()
def open_files(self, files):
"""Attempt to load all of the specified files.
"""
Widgets.progressbar.show()
invalid, total = [], len(files)
for i, name in enumerate(files, 1):
Widgets.redraw_interface(i / total, basename(name))
try:
try:
Photograph.load_from_file(name)
except OSError:
TrackFile.load_from_file(name)
except OSError:
invalid.append(basename(name))
if invalid:
Widgets.status_message(_('Could not open: ') + ', '.join(invalid))