diff --git a/OlivOS/nativeWinUIAPI.py b/OlivOS/nativeWinUIAPI.py index 28de21ea..1ae62834 100644 --- a/OlivOS/nativeWinUIAPI.py +++ b/OlivOS/nativeWinUIAPI.py @@ -1998,6 +1998,7 @@ def resFunc(): ) return resFunc + self.init_style() self.root_Checkbutton_init( obj_root='root', obj_name='root_checkbutton_flag_group', @@ -2135,6 +2136,17 @@ def root_Button_init(self, name, text, command, x, y, width, height): height=height ) + def init_style(self): + self.UIData['style'] = ttk.Style(self.UIObject['root']) + self.UIData['style'].configure( + "TCheckbutton", + indicatorbackground=self.UIConfig['color_001'], + indicatorforeground=self.UIConfig['color_004'], + background=self.UIConfig['color_001'], + foreground=self.UIConfig['color_004'] + ) + #self.UIData['style'].map("TCheckbutton", background=[("active", "darkgrey")]) + def root_Checkbutton_init(self, obj_root, obj_name, str_name, x, y, width_t, width, height, action, title=''): self.UIObject[obj_name + '=Label'] = tkinter.Label( self.UIObject[obj_root], @@ -2159,8 +2171,7 @@ def root_Checkbutton_init(self, obj_root, obj_name, str_name, x, y, width_t, wid variable=self.UIData[str_name], onvalue=True, offvalue=False, - - # command=action + style='TCheckbutton' ) # self.UIObject[obj_name].configure( # bg=self.UIConfig['color_001'], diff --git a/OlivOS/virtualTerminalSDK.py b/OlivOS/virtualTerminalSDK.py index f6557deb..60fe3b8b 100644 --- a/OlivOS/virtualTerminalSDK.py +++ b/OlivOS/virtualTerminalSDK.py @@ -125,7 +125,8 @@ def get_Event_from_SDK(target_event): target_event.data.sender['name'] = tmp_user_conf["user_name"] target_event.data.sender['sex'] = 'unknown' target_event.data.sender['age'] = 0 - if tmp_user_conf["flag_group"]: + if tmp_user_conf["flag_group"] \ + and 'unknown' != tmp_user_conf["group_role"]: target_event.data.sender['role'] = tmp_user_conf["group_role"] target_event.data.host_id = None elif target_event.platform['model'] in ['postapi', 'ff14']: