-
Notifications
You must be signed in to change notification settings - Fork 67
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Start on work to allow toolbar to be hidden/shown when mouse goes over. Involves having a second label - just a few pixels tall. When the mouse goes over it - hide it & show the toolbar. When the mouse leaves the toolbar - hide it & show the label. Includes a function to ```setToolbarPinned()``` to turn it on/off. Now needs an icon (drawing pin) to place in toolbar to call the pin function/show pin status.
- Loading branch information
1 parent
2ebd6c7
commit 53fb7a8
Showing
3 changed files
with
66 additions
and
5 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 |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import sys | ||
sys.path.append("../") | ||
from appJar import gui | ||
|
||
pin = True | ||
|
||
def tbFunc(btn): | ||
print(btn) | ||
|
||
def pin(btn): app.setToolbarPinned(True) | ||
def unpin(btn): app.setToolbarPinned(False) | ||
|
||
def tbOut(btn): app.hideToolbar() | ||
def tbIn(btn): app.showToolbar() | ||
|
||
app = gui() | ||
|
||
app.addToolbar(["Save", "Open", "Close"], tbFunc, True) | ||
|
||
app.addButtons(["Pin", "Unpin", "Hide", "Show"], [pin, unpin, tbOut, tbIn]) | ||
app.addLabel("l1", "", colspan=2) | ||
#app.setLabelOverFunction("l1", [tbIn, tbOut]) | ||
app.setToolbarPinned(False) | ||
|
||
app.go() |
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