Skip to content

Commit

Permalink
调整虚拟终端账号设置页面滴答框样式
Browse files Browse the repository at this point in the history
  • Loading branch information
lunzhiPenxil committed Oct 19, 2023
1 parent 47a0d4e commit 28a0223
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
15 changes: 13 additions & 2 deletions OlivOS/nativeWinUIAPI.py
Original file line number Diff line number Diff line change
Expand Up @@ -1998,6 +1998,7 @@ def resFunc():
)
return resFunc

self.init_style()
self.root_Checkbutton_init(
obj_root='root',
obj_name='root_checkbutton_flag_group',
Expand Down Expand Up @@ -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],
Expand All @@ -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'],
Expand Down
3 changes: 2 additions & 1 deletion OlivOS/virtualTerminalSDK.py
Original file line number Diff line number Diff line change
Expand Up @@ -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']:
Expand Down

0 comments on commit 28a0223

Please sign in to comment.