我是GUI开发的新手,最近开始在Ubuntu上开发一个简单的应用程序,方法是使用林间空地设计UI并使用PyGObject在python中编写代码。到目前为止,我一直做得不错,直到遇到一个神秘的问题。
子窗口上的单选按钮指示未显示。我已经能够切换它们并检索哪个按钮处于活动状态,但指示器本身未显示。我已经将这些按钮的“属性”与我在主窗口中放置的其他两个单选按钮(外观和按预期工作)进行了比较,但没有发现任何区别。
有人可以建议解决此问题的方法吗?我不确定需要什么全部信息,但是这里有一些入门图片。
Screenshot from the executable
编辑:打开生成日志窗口的代码
def on_generate_logs_activate(self, widget):
#Setup generate logs window
self.builder.add_from_file("myprogram6.glade")
self.generate_logs_window = self.builder.get_object("generate_logs_window")
self.generate_logs_window.show_all()
self.all_records = self.builder.get_object("all_records") #Radio1
self.specific_record = self.builder.get_object("specific_record") #Radio2
self.dialog_record_combo = self.builder.get_object("dialog_record_combo")
self.generate = self.builder.get_object("generate")
self.dialog_close = self.builder.get_object("dialog_close")
self.record_set1 = self.builder.get_object("liststore1")
self.dialog_record_combo.set_sensitive(False)
#Setup combotext
self.dialog_record_combo.set_entry_text_column(1)
records = self.get_unprocessed_records()
for record in records:
record=record.split('.')
self.record_set1.append([record[0]])
#Radios
self.all_records.connect("toggled", self.on_all_records_toggled)
self.specific_record.connect("toggled", self.on_specific_record_toggled)
#Generate button
self.generate.connect("clicked", self.on_generate_clicked)
#Close button
self.dialog_close.connect("clicked", self.on_dialog_close_clicked)
如果您要我添加更多信息,请告诉我。
答案 0 :(得分:0)
我猜你没有打window.show_all()。同样,我猜测是因为您没有发布代码,所以不可能知道。
答案 1 :(得分:0)
看https://www.youtube.com/watch?v=RxqZ_2fz-ZI 我的猜测:您的应用程序结构不正确。 观看视频4和5,您将了解如何构成。 a)创建python文件,顶部导入。因此将其命名为application.py并包含
import gi
#
gi.require_version('Gtk', '3.0')
from gi.repository import Gtk as gtk, Gdk as gdk, GLib, GObject as gobject
gobject.threads_init()
import string # not used for now
import os # not used for now
from datetime import datetime, timedelta
import time
import threading..
b)以下称为GUIclass的类GUI(在视频中称为“ foo”) c)链接到该类中的glade文件的几个def d) init (导入glade文件) e)主要
请参阅以下摘录。看看在github上用glade / pygtk完成的一些应用程序。
class GUIclass:
#
def exit_action(self, widget, data=None):
self.exitdialog.show()
def exit_confirmed(self, widget, data=None):
self.exitdialog.hide()
game_not_cancelled = False
...
gtk.main_quit()
return True
def exit_aborted(self, widget, data=None):
self.exitdialog.hide()
def watch_stop_yes(self, widget, data=None):
#
def deactivate_event_mode(self, widget, data=None):
...
def __init__(self):
...
number_of_period = 2
watch_stop_default = True
add_time_seconds = 0
#
# define all relations between labels and entries and combobox and spinbutton and python variables
builder = gtk.Builder()
builder.add_from_file("/home/family/glade/scoreboard_uwr_180815.glade")
#
# load all windows
self.controlwindow = builder.get_object("scoreboard_control_window")
self.viewwindow = builder.get_object("scoreboard_view_window")
self.logdialog = builder.get_object("scoreboard_log_dialog")
self.logoffdialog = builder.get_object("scoreboard_logoff_confirm")
self.logcanceldialog = builder.get_object("scoreboard_logcancel_confirm")
self.resetdialog = builder.get_object("scoreboard_resetconfirm")
self.exitdialog = builder.get_object("scoreboard_exitconfirm")
#
# declaration of all data from the "scoreboard_control_window"
self.spinbutton_points_team_left = builder.get_object("spinbutton_points_team_left")
self.spinbutton_points_team_right = builder.get_object("spinbutton_points_team_right")
self.spinbutton_timeout_left = builder.get_object("spinbutton_timeout_left")
self.spinbutton_timeout_right = builder.get_object("spinbutton_timeout_right")
self.spinbutton_period_time = builder.get_object("spinbutton_period_time")
self.spinbutton_period = builder.get_object("spinbutton_period")
self.spinbutton_break_time = builder.get_object("spinbutton_break_time")
self.spinbutton_penalty_duration = builder.get_object("spinbutton_penalty_duration")
self.spinbutton_timeout = builder.get_object("spinbutton_timeout")
self.spinbutton_time_penalty = builder.get_object("spinbutton_time_penalty")
self.spinbutton_add_time = builder.get_object("spinbutton_add_time")
self.spinbutton_warning_timepenalty = builder.get_object("spinbutton_warning_timepenalty")
self.spinbutton_warning_break_timeout = builder.get_object("spinbutton_warning_break_timeout")
#
self.togglebutton_start_stop_game = builder.get_object("togglebutton_start_stop_game")
# self.comboboxtext_watch_stop = builder.get_object("comboboxtext_watch_stop")
self.entry_tournament_name = builder.get_object("entry_tournament_name")
self.entry_tournament_contact = builder.get_object("entry_tournament_contact")
self.entry_team_blue_name = builder.get_object("entry_team_blue_name")
self.entry_team_white_name = builder.get_object("entry_team_white_name")
self.entry_name_penalty_player_1_left = builder.get_object("entry_name_penalty_player_1_left")
self.entry_name_penalty_player_2_left = builder.get_object("entry_name_penalty_player_2_left")
self.entry_name_penalty_player_3_left = builder.get_object("entry_name_penalty_player_3_left")
self.entry_name_penalty_player_1_right = builder.get_object("entry_name_penalty_player_1_right")
self.entry_name_penalty_player_2_right = builder.get_object("entry_name_penalty_player_2_right")
self.entry_name_penalty_player_3_right = builder.get_object("entry_name_penalty_player_3_right")
# define here further entries
#
self.label_control_current_time = builder.get_object("label_control_current_time")
self.eventbox_control_left = builder.get_object("eventbox_control_left")
# self.eventbox_blue_team = builder.get_object("eventbox_blue_team")
self.label_control_team_name_left = builder.get_object("label_control_team_name_left")
self.eventbox_control_right = builder.get_object("eventbox_control_right")
self.label_control_team_name_right = builder.get_object("label_control_team_name_right")
self.label_control_tournament_name = builder.get_object("label_control_tournament_name")
self.label_control_tournament_contact = builder.get_object("label_control_tournament_contact")
self.spinbutton_minutes_time_correction = builder.get_object("spinbutton_minutes_time_correction")
self.spinbutton_seconds_time_correction = builder.get_object("spinbutton_seconds_time_correction")
# self.label_special_time_sequence = builder.get_object("label_special_time_sequence")
#
self.label_control_time_penalty_player_1_left = builder.get_object("label_control_time_penalty_player_1_left")
self.label_control_time_penalty_player_2_left = builder.get_object("label_control_time_penalty_player_2_left")
self.label_control_time_penalty_player_3_left = builder.get_object("label_control_time_penalty_player_3_left")
self.label_control_time_penalty_player_1_right = builder.get_object("label_control_time_penalty_player_1_right")
self.label_control_time_penalty_player_2_right = builder.get_object("label_control_time_penalty_player_2_right")
self.label_control_time_penalty_player_3_right = builder.get_object("label_control_time_penalty_player_3_right")
#
# self.label_timeout = builder.get_object("label_timeout")
# self.label_break = builder.get_object("label_break")
# self.label_penalty = builder.get_object("label_penalty")
#
self.spinbutton_points_team_left = builder.get_object("spinbutton_points_team_left")
self.spinbutton_points_team_right = builder.get_object("spinbutton_points_team_right")
self.eventbox_control_points_team_left = builder.get_object("eventbox_control_points_team_left")
self.eventbox_control_points_team_right = builder.get_object("eventbox_control_points_team_right")
self.label_control_points_team_left = builder.get_object("label_control_points_team_left")
self.label_control_points_team_right = builder.get_object("label_control_points_team_right")
self.label_control_special_time_sequence = builder.get_object("label_control_special_time_sequence")
self.eventbox_control_team_name_left = builder.get_object("eventbox_control_team_name_left")
self.eventbox_control_team_name_right = builder.get_object("eventbox_control_team_name_right")
#
# declaration of all data from the view window
self.eventbox_view_team_color_left = builder.get_object("eventbox_view_team_color_left")
self.eventbox_view_team_color_right = builder.get_object("eventbox_view_team_color_right")
self.eventbox_view_points_team_left = builder.get_object("eventbox_view_points_team_left")
self.eventbox_view_points_team_right = builder.get_object("eventbox_view_points_team_right")
self.label_view_period = builder.get_object("label_view_period")
self.label_view_current_time = builder.get_object("label_view_current_time")
self.label_view_points_team_left = builder.get_object("label_view_points_team_left")
self.label_view_timeout_left = builder.get_object("label_view_timeout_left")
self.label_view_timeout_right = builder.get_object("label_view_timeout_right")
self.label_view_points_team_right = builder.get_object("label_view_points_team_right")
self.eventbox_view_team_color_left = builder.get_object("eventbox_view_team_color_left")
self.eventbox_view_team_color_right = builder.get_object("eventbox_view_team_color_right")
self.label_view_team_name_left = builder.get_object("label_view_team_name_left")
self.label_view_team_name_right = builder.get_object("label_view_team_name_right")
self.eventbox_view_team_name_left = builder.get_object("eventbox_view_team_name_left")
self.eventbox_view_team_name_right = builder.get_object("eventbox_view_team_name_right")
self.label_view_tournament_name = builder.get_object("label_view_tournament_name")
self.label_view_tournament_contact = builder.get_object("label_view_tournament_contact")
self.label_view_specific_timesequence = builder.get_object("label_view_specific_timesequence")
self.label_view_status_specific_timesequence = builder.get_object("label_view_status_specific_timesequence")
self.label_view_special_time_sequence = builder.get_object("label_view_special_time_sequence")
self.label_view_time_penalty_player_1_left = builder.get_object("label_view_time_penalty_player_1_left")
self.label_view_time_penalty_player_2_left = builder.get_object("label_view_time_penalty_player_2_left")
self.label_view_time_penalty_player_3_left = builder.get_object("label_view_time_penalty_player_3_left")
self.label_view_time_penalty_player_1_right = builder.get_object("label_view_time_penalty_player_1_right")
self.label_view_time_penalty_player_2_right = builder.get_object("label_view_time_penalty_player_2_right")
self.label_view_time_penalty_player_3_right = builder.get_object("label_view_time_penalty_player_3_right")
#
self.label_view_name_penalty_player_1_left = builder.get_object("label_view_name_penalty_player_1_left")
self.label_view_name_penalty_player_2_left = builder.get_object("label_view_name_penalty_player_2_left")
self.label_view_name_penalty_player_3_left = builder.get_object("label_view_name_penalty_player_3_left")
self.label_view_name_penalty_player_1_right = builder.get_object("label_view_name_penalty_player_1_right")
self.label_view_name_penalty_player_2_right = builder.get_object("label_view_name_penalty_player_2_right")
self.label_view_name_penalty_player_3_right = builder.get_object("label_view_name_penalty_player_3_right")
#
self.button_blue_starts_left = builder.get_object("button_blue_starts_left")
self.button_blue_starts_right = builder.get_object("button_blue_starts_right")
self.button_type_view_invertedcontrolview = builder.get_object("button_type_view_invertedcontrolview")
self.button_type_view_copycontrolview = builder.get_object("button_type_view_copycontrolview")
self.button_separate_game_view_off = builder.get_object("button_separate_game_view_off")
self.button_separate_game_view_on = builder.get_object("button_separate_game_view_on")
self.button_log_functionality_off = builder.get_object("button_log_functionality_off")
self.button_log_functionality_on = builder.get_object("button_log_functionality_on")
self.entry_log_filename = builder.get_object("entry_log_filename")
self.button_nostop_watch = builder.get_object("button_nostop_watch")
self.button_stop_watch = builder.get_object("button_stop_watch")
self.button_activate_timepenalty_player_1_left = builder.get_object("button_activate_timepenalty_player_1_left")
self.button_activate_timepenalty_player_2_left = builder.get_object("button_activate_timepenalty_player_2_left")
self.button_activate_timepenalty_player_3_left = builder.get_object("button_activate_timepenalty_player_3_left")
self.button_activate_timepenalty_player_1_right = builder.get_object(
"button_activate_timepenalty_player_1_right")
self.button_activate_timepenalty_player_2_right = builder.get_object(
"button_activate_timepenalty_player_2_right")
self.button_activate_timepenalty_player_3_right = builder.get_object(
"button_activate_timepenalty_player_3_right")
self.button_clear_timepenalty_player_1_left = builder.get_object("button_clear_timepenalty_player_1_left")
self.button_clear_timepenalty_player_2_left = builder.get_object("button_clear_timepenalty_player_2_left")
self.button_clear_timepenalty_player_3_left = builder.get_object("button_clear_timepenalty_player_3_left")
self.button_clear_timepenalty_player_1_right = builder.get_object("button_clear_timepenalty_player_1_right")
self.button_clear_timepenalty_player_2_right = builder.get_object("button_clear_timepenalty_player_2_right")
self.button_clear_timepenalty_player_3_right = builder.get_object("button_clear_timepenalty_player_3_right")
self.button_stop_special_time_sequence = builder.get_object("button_stop_special_time_sequence")
self.button_start_special_time_sequence = builder.get_object("button_start_special_time_sequence")
self.button_clearreset_special_time_sequence = builder.get_object("button_clearreset_special_time_sequence")
self.button_special_time_sequence_none = builder.get_object("button_special_time_sequence_none")
self.button_special_time_sequence_timeout = builder.get_object("button_special_time_sequence_timeout")
self.button_special_time_sequence_break = builder.get_object("button_special_time_sequence_break")
self.button_special_time_sequence_penalty = builder.get_object("button_special_time_sequence_penalty")
#
self.ChooserButton_read_file_settings = builder.get_object("ChooserButton_read_file_settings")
#
self.label_log_dialog_time = builder.get_object("label_log_dialog_time")
self.entry_log_dialog_remark_referee = builder.get_object("entry_log_dialog_remark_referee")
self.entry_log_dialog_remark_scripter = builder.get_object("entry_log_dialog_remark_scripter")
##################################
# INIT the matrix of all inputs
#
col = 14
row = 10
logdata_array = [[""] * col for _ in range(row)]
#neutralarrayline = ["","","","","","","","","","","","","",""]
#logdata_array = []
#for i in range(9):
# logdata_array.append(neutralarrayline)
self.entry_logarray = []
for i in range(10):
self.entry_logarray.append([])
for j in range(14):
self.entry_logarray[i].append([])
stringglade = str('%(prefix)s%(line)02d_%(column)02d'%{'prefix': "ld", 'line': i, 'column': j})
#print(stringglade)
#"ld"+str(i)+"_"+str(j)
self.entry_logarray[i][j] = builder.get_object(stringglade)
##################################
#self.entry_log_dialog_remark_equipment = builder.get_object("entry_log_dialog_remark_equipment")
self.entry_anytime_line1intolog = builder.get_object("entry_anytime_line1intolog")
self.entry_anytime_line2intolog = builder.get_object("entry_anytime_line2intolog")
self.eventbox_exitbutton = builder.get_object("eventbox_exitbutton")
self.eventbox_resetbutton = builder.get_object("eventbox_resetbutton")
self.button_exit_view_window = builder.get_object("button_exit_view_window")
#
# connect all signals to actions
builder.connect_signals(self)
thread_time_control.connect("update_timers", self.update_timer_labels)
#
# GDK_Escape = 0xff1b
buffer_time_start_special_time_sequence = datetime.now()
#
# datetime data useful for elapsed time calculation and later for log / protocol
start_time_of_the_game = datetime.now()
start_time_control_timepenalty_player1_left = datetime.now()
start_time_control_timepenalty_player2_left = datetime.now()
start_time_control_timepenalty_player3_left = datetime.now()
start_time_control_timepenalty_player1_right = datetime.now()
start_time_control_timepenalty_player2_right = datetime.now()
start_time_control_timepenalty_player3_right = datetime.now()
start_time_of_second_period = datetime.now()
end_time_of_the_game = datetime.now() # usefull for log / protocol
# for running time calculation of the main time counting
buffer_last_time_stop = datetime.now()
buffer_last_time_stop_control_timepenalty_player1_left = datetime.now()
buffer_last_time_stop_control_timepenalty_player2_left = datetime.now()
buffer_last_time_stop_control_timepenalty_player3_left = datetime.now()
buffer_last_time_stop_control_timepenalty_player1_right = datetime.now()
buffer_last_time_stop_control_timepenalty_player2_right = datetime.now()
buffer_last_time_stop_control_timepenalty_player3_right = datetime.now()
buffer_last_time_start = datetime.now()
buffer_last_time_start_control_timepenalty_player1_left = datetime.now()
buffer_last_time_start_control_timepenalty_player2_left = datetime.now()
buffer_last_time_start_control_timepenalty_player3_left = datetime.now()
buffer_last_time_start_control_timepenalty_player1_right = datetime.now()
buffer_last_time_start_control_timepenalty_player2_right = datetime.now()
buffer_last_time_start_control_timepenalty_player3_right = datetime.now()
#
# SEVERAL global parameters and stopwatches to be defined
# FIRST for period time downcounting
# SECOND for special_time_sequence
# 3 for the time penalty players left
# 3 for the time penalty players right
#
ellapsed_period_time_seconds = 0
buffer_last_started_ellapsed_period_time_seconds = 0
period_time_in_second = 15 * 60
period_time_in_second_orig = 15*60
counter_seconds_board = 15 * 60
warning_timepenalty = warning_default_timepenalty
warning_break_timeout = warning_default_break_timeout
#
# diverse parameter of special_time_sequence
timepenalty_maximum_seconds = 120
penalty_maximum_seconds = 45
timeout_maximum_seconds = 1 * 60
break_maximum_seconds = 300
ellapsed_special_time_sequence_seconds = 0
counter_seconds_special_time_sequence = 0
ellapsed_maximum_time_special_sequence_seconds = 300
#
ellapsed_time_penalty_player_1_left_seconds = 0
buffer_last_started_ellapsed_time_penalty_player_1_left_seconds = 0
counter_seconds_time_penalty_player_1_left = 0
#
ellapsed_time_penalty_player_2_left_seconds = 0
buffer_last_started_ellapsed_time_penalty_player_2_left_seconds = 0
counter_seconds_time_penalty_player_2_left = 0
#
ellapsed_time_penalty_player_3_left_seconds = 0
buffer_last_started_ellapsed_time_penalty_player_3_left_seconds = 0
counter_seconds_time_penalty_player_3_left = 0
#
ellapsed_time_penalty_player_1_right_seconds = 0
buffer_last_started_ellapsed_time_penalty_player_1_right_seconds = 0
counter_seconds_time_penalty_player_1_right = 0
#
ellapsed_time_penalty_player_2_right_seconds = 0
buffer_last_started_ellapsed_time_penalty_player_2_right_seconds = 0
counter_seconds_time_penalty_player_2_right = 0
#
ellapsed_time_penalty_player_3_right_seconds = 0
buffer_last_started_ellapsed_time_penalty_player_3_right_seconds = 0
counter_seconds_time_penalty_player_3_right = 0
#
activated_time_penalty_player_1_left_to_enter_or_delete = False
activated_time_penalty_player_2_left_to_enter_or_delete = False
activated_time_penalty_player_3_left_to_enter_or_delete = False
activated_time_penalty_player_1_right_to_enter_or_delete = False
activated_time_penalty_player_2_right_to_enter_or_delete = False
activated_time_penalty_player_3_right_to_enter_or_delete = False
#
time_penalty_player_1_left_initialized = False
time_penalty_player_1_right_initialized = False
time_penalty_player_2_left_initialized = False
time_penalty_player_2_right_initialized = False
time_penalty_player_3_left_initialized = False
time_penalty_player_3_right_initialized = False
#
# diverse helpfull match status or timing
game_started = False
action_start_time_of_the_game_is_ACTIVE = False # toggle button start / stop of the overall timing
running_period_time = False
running_first_period_time = False
running_second_period_time = False
running_penalty = False
running_timeout = False
running_break = False
stopped_special_time_sequence = False
# basic setup of team name
left_team_is_blue = True # at application start
#
running_time_penalty_player_1_left = False
running_time_penalty_player_2_left = False
running_time_penalty_player_3_left = False
running_time_penalty_player_1_right = False
running_time_penalty_player_2_right = False
running_time_penalty_player_3_right = False
#
# buffer for switching the results from right to left in the score viewer
buffer_counter_minutes_time_penalty_player_1 = 0
buffer_counter_seconds_time_penalty_player_1 = 0
buffer_counter_minutes_time_penalty_player_2 = 0
buffer_counter_seconds_time_penalty_player_2 = 0
buffer_counter_minutes_time_penalty_player_3 = 0
buffer_counter_seconds_time_penalty_player_3 = 0
buffer_running_time_penalty_player_1_left = False
buffer_running_time_penalty_player_2_left = False
buffer_running_time_penalty_player_3_left = False
buffer_points_team = 0
################################
# right is white background (and black letter)
self.eventbox_control_right.override_background_color(gtk.StateFlags.NORMAL, gdk.RGBA(1, 1, 1, 1))
self.eventbox_view_team_color_right.override_background_color(gtk.StateFlags.NORMAL, gdk.RGBA(1, 1, 1, 1))
# right point area white
self.eventbox_control_points_team_right.override_background_color(gtk.StateFlags.NORMAL, gdk.RGBA(1, 1, 1, 1))
self.eventbox_view_points_team_right.override_background_color(gtk.StateFlags.NORMAL, gdk.RGBA(1, 1, 1, 1))
self.eventbox_control_team_name_right.override_background_color(gtk.StateFlags.NORMAL, gdk.RGBA(1, 1, 1, 1))
self.eventbox_view_team_name_right.override_background_color(gtk.StateFlags.NORMAL, gdk.RGBA(1, 1, 1, 1))
# right letters of points black in white team
self.label_control_points_team_right.override_color(gtk.StateFlags.NORMAL, gdk.RGBA(0, 0, 0, 1))
self.label_view_points_team_right.override_color(gtk.StateFlags.NORMAL, gdk.RGBA(0, 0, 0, 1))
self.label_control_team_name_right.override_color(gtk.StateFlags.NORMAL, gdk.RGBA(0, 0, 0, 1))
self.label_view_team_name_right.override_color(gtk.StateFlags.NORMAL, gdk.RGBA(0, 0, 0, 1))
#
# left point area blue
self.eventbox_control_left.override_background_color(gtk.StateFlags.NORMAL, gdk.RGBA(0, 0, 1, 1))
self.eventbox_view_team_color_left.override_background_color(gtk.StateFlags.NORMAL, gdk.RGBA(0, 0, 1, 1))
self.eventbox_control_points_team_left.override_background_color(gtk.StateFlags.NORMAL, gdk.RGBA(0, 0, 1, 1))
self.eventbox_view_points_team_left.override_background_color(gtk.StateFlags.NORMAL, gdk.RGBA(0, 0, 1, 1))
# left letters of points white in blue team
self.label_control_points_team_left.override_color(gtk.StateFlags.NORMAL, gdk.RGBA(1, 1, 1, 1))
self.label_view_points_team_left.override_color(gtk.StateFlags.NORMAL, gdk.RGBA(1, 1, 1, 1))
self.eventbox_control_team_name_left.override_background_color(gtk.StateFlags.NORMAL, gdk.RGBA(0, 0, 1, 1))
self.eventbox_view_team_name_left.override_background_color(gtk.StateFlags.NORMAL, gdk.RGBA(0, 0, 1, 1))
self.label_control_team_name_left.override_color(gtk.StateFlags.NORMAL, gdk.RGBA(1, 1, 1, 1))
self.label_view_team_name_left.override_color(gtk.StateFlags.NORMAL, gdk.RGBA(1, 1, 1, 1))
#
#
self.entry_tournament_name.set_text("tournament")
self.label_control_tournament_name.set_text("tournament")
self.label_view_tournament_name.set_text("tournament")
#
self.entry_tournament_contact.set_text("Ms./Mr.")
self.label_control_tournament_contact.set_text("Ms./Mr.")
self.label_view_tournament_contact.set_text("Ms./Mr.")
#
self.entry_team_blue_name.set_text("TeamBLUE")
self.label_control_team_name_left.set_text("TeamBLUE")
self.label_view_team_name_left.set_text("Team BLUE")
#
self.entry_team_white_name.set_text("TeamWHITE")
self.label_control_team_name_right.set_text("TeamWHITE")
self.label_view_team_name_right.set_text("Team WHITE")
#
# make exit button for red
self.eventbox_exitbutton.override_background_color(gtk.StateFlags.NORMAL, gdk.RGBA(1, 0, 0, 1))
#
# orange https://en.wikipedia.org/wiki/X11_color_names test rgb 100% 65% 0%
self.eventbox_resetbutton.override_background_color(gtk.StateFlags.NORMAL, gdk.RGBA(1, 0.65, 0, 1))
# make reset button for red
# self.eventbox_resetbutton.override_background_color(gtk.StateFlags.NORMAL, gdk.RGBA(1, 0, 0, 1))
self.label_control_special_time_sequence.set_text("none")
#
style_provider = gtk.CssProvider()
############################################################################################
############################################################################################
#
# modify that link below at a new installation
#
############################################################################################
css = open('/home/family/glade/scoreboard_uwr/scoreboard_gui_styles.css',
'rb') # rb needed for python 3 support
############################################################################################
############################################################################################
css_data = css.read()
css.close()
style_provider.load_from_data(css_data)
gtk.StyleContext.add_provider_for_screen(gdk.Screen.get_default(), style_provider,
gtk.STYLE_PROVIDER_PRIORITY_APPLICATION)
if __name__ == "__main__":
GUI = GUIclass()
GUI.controlwindow.show()
gtk.main()