Fix for setting look and feel to system default
This commit is contained in:
parent
6272927ae6
commit
77e0f71b10
|
@ -5068,7 +5068,7 @@ def PackFormIntoFrame(form, containing_frame, toplevel_form):
|
||||||
elif toplevel_form.TextJustification is not None:
|
elif toplevel_form.TextJustification is not None:
|
||||||
justification = toplevel_form.TextJustification
|
justification = toplevel_form.TextJustification
|
||||||
else:
|
else:
|
||||||
justification = DEFAULT_TEXT_JUSTIFICAION
|
justification = DEFAULT_TEXT_JUSTIFICATION
|
||||||
justify = tk.LEFT if justification == 'left' else tk.CENTER if justification == 'center' else tk.RIGHT
|
justify = tk.LEFT if justification == 'left' else tk.CENTER if justification == 'center' else tk.RIGHT
|
||||||
anchor = tk.NW if justification == 'left' else tk.N if justification == 'center' else tk.NE
|
anchor = tk.NW if justification == 'left' else tk.N if justification == 'center' else tk.NE
|
||||||
# tktext_label = tk.Label(tk_row_frame, textvariable=stringvar, width=width, height=height,
|
# tktext_label = tk.Label(tk_row_frame, textvariable=stringvar, width=width, height=height,
|
||||||
|
@ -5614,7 +5614,8 @@ def PackFormIntoFrame(form, containing_frame, toplevel_form):
|
||||||
bd=border_depth)
|
bd=border_depth)
|
||||||
else:
|
else:
|
||||||
element.tktext_label = element.Widget = tk.Label(tk_row_frame, width=width, height=height, bd=border_depth)
|
element.tktext_label = element.Widget = tk.Label(tk_row_frame, width=width, height=height, bd=border_depth)
|
||||||
if element.BackgroundColor is not None:
|
|
||||||
|
if not element.BackgroundColor in (None, COLOR_SYSTEM_DEFAULT):
|
||||||
element.tktext_label.config(background=element.BackgroundColor)
|
element.tktext_label.config(background=element.BackgroundColor)
|
||||||
|
|
||||||
element.tktext_label.image = photo
|
element.tktext_label.image = photo
|
||||||
|
@ -7752,10 +7753,6 @@ def main():
|
||||||
[Listbox(['Listbox 1', 'Listbox 2', 'Listbox 3'], size=(20, 5))],
|
[Listbox(['Listbox 1', 'Listbox 2', 'Listbox 3'], size=(20, 5))],
|
||||||
[Combo(['Combo item 1', ], size=(20, 3), text_color='red', background_color='red')],
|
[Combo(['Combo item 1', ], size=(20, 3), text_color='red', background_color='red')],
|
||||||
[Combo(['Combo item 1', ], size=(20, 3), text_color='red', background_color='red')],
|
[Combo(['Combo item 1', ], size=(20, 3), text_color='red', background_color='red')],
|
||||||
[Combo(['Combo item 1', ], size=(20, 3), text_color='red', background_color='red')],
|
|
||||||
[Combo(['Combo item 1', ], size=(20, 3), text_color='red', background_color='red')],
|
|
||||||
[Combo(['Combo item 1', ], size=(20, 3), text_color='red', background_color='red')],
|
|
||||||
[Combo(['Combo item 1', ], size=(20, 3), text_color='red', background_color='red')],
|
|
||||||
[Spin([1, 2, 3], size=(4, 3))],
|
[Spin([1, 2, 3], size=(4, 3))],
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue