mirror of
https://github.com/TomSchimansky/CustomTkinter.git
synced 2023-08-10 21:13:13 +03:00
Fix Frame inside ScrollableFrame
Frames inside ScrollableFrames did not get a new top level fg_color and remained the same color as the parent. Implemented a fix by checking if the parent of a Frame is a ScrollableFrame and changing the fg_color to be like any Frame inside another Frame
This commit is contained in:
parent
09e584634c
commit
9f33f13e1b
@ -4,6 +4,7 @@ from .core_rendering import CTkCanvas
|
|||||||
from .theme import ThemeManager
|
from .theme import ThemeManager
|
||||||
from .core_rendering import DrawEngine
|
from .core_rendering import DrawEngine
|
||||||
from .core_widget_classes import CTkBaseClass
|
from .core_widget_classes import CTkBaseClass
|
||||||
|
import customtkinter.windows.widgets as widgets
|
||||||
|
|
||||||
|
|
||||||
class CTkFrame(CTkBaseClass):
|
class CTkFrame(CTkBaseClass):
|
||||||
@ -44,6 +45,8 @@ class CTkFrame(CTkBaseClass):
|
|||||||
self._fg_color = ThemeManager.theme["CTkFrame"]["fg_color"]
|
self._fg_color = ThemeManager.theme["CTkFrame"]["fg_color"]
|
||||||
else:
|
else:
|
||||||
self._fg_color = ThemeManager.theme["CTkFrame"]["fg_color"]
|
self._fg_color = ThemeManager.theme["CTkFrame"]["fg_color"]
|
||||||
|
if isinstance(self.master, widgets.ctk_scrollable_frame.CTkScrollableFrame):
|
||||||
|
self._fg_color = ThemeManager.theme["CTkFrame"]["top_fg_color"]
|
||||||
else:
|
else:
|
||||||
self._fg_color = self._check_color_type(fg_color, transparency=True)
|
self._fg_color = self._check_color_type(fg_color, transparency=True)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user