-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replaced List[Datapoint] objects with DatapointCollections
Toolbar background color now changes with appearance mode
- Loading branch information
Kobsel
committed
Jan 10, 2025
1 parent
8b1049f
commit 94b2deb
Showing
5 changed files
with
44 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,27 @@ | ||
from tkinter import Canvas | ||
import tkinter as tk | ||
|
||
from matplotlib.backends.backend_tkagg import NavigationToolbar2Tk | ||
|
||
|
||
class Toolbar(): | ||
def __init__(self, parent,): | ||
self.parent = parent | ||
|
||
#Create frame to hold Toolbar | ||
|
||
toolbar_frame = tk.Frame(parent) | ||
toolbar_frame.config(bg="white") | ||
toolbar_frame.grid(row=0, column=0, sticky="new") # Use grid for the frame | ||
toolbar = NavigationToolbar2Tk(self.parent.graph.canvas, toolbar_frame) | ||
#toolbar.config(bg="white")# Pack inside the frame | ||
toolbar_frame.grid(row=0, | ||
column=0, | ||
padx=10, | ||
pady=10, | ||
sticky="new" | ||
) | ||
|
||
#Create Toolbar | ||
|
||
toolbar = NavigationToolbar2Tk(self.parent.graph.canvas, | ||
toolbar_frame) | ||
#Adjust background color | ||
toolbar.config(bg=self.parent.graph.main_color) | ||
toolbar.update() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters