Skip to content

Commit 3ccca0b

Browse files
authored
Merge pull request #4 from healkeiser/dev
v11.2.0: Replaced tooltips by FXTooltip in FXMainWindow
2 parents 2958251 + 727baa1 commit 3ccca0b

File tree

12 files changed

+881
-112
lines changed

12 files changed

+881
-112
lines changed

.claude/settings.local.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
"Bash(tree:*)",
99
"Bash(wc:*)",
1010
"Bash(DEVELOPER_MODE=1 python:*)",
11-
"Bash(du:*)"
11+
"Bash(du:*)",
12+
"Bash(git fsck:*)"
1213
]
1314
}
1415
}

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# AI
2+
tmpclaude*
3+
14
# Node.js modules and lock files
25
node_modules/
36
package-lock.json

MANIFEST.in

Lines changed: 61 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,37 @@
1-
recursive-include fxgui *
1+
# Only include Python source and package resources from fxgui package
2+
recursive-include fxgui *.py
3+
recursive-include fxgui *.yaml
4+
recursive-include fxgui *.svg
5+
recursive-include fxgui *.png
6+
recursive-include fxgui *.qss
7+
recursive-include fxgui *.ui
28

3-
# Root-level directories to exclude (safety)
4-
prune .vscode
9+
# Exclude root-level directories not needed in sdist
510
prune .github
6-
prune .claude
7-
prune .cache
8-
prune .venv
911
prune .scripts
10-
prune build
12+
prune .vscode
13+
prune .claude
1114
prune docs
1215
prune site
13-
prune *.egg-info
1416

15-
# Bytecode and cache
17+
# Exclude root-level config files
18+
exclude .auto-changelog
19+
exclude CLAUDE.md
20+
exclude mkdocs.yml
21+
exclude requirements*.txt
22+
exclude *.code-workspace
23+
24+
# Bytecode and cache - exclude everywhere
1625
global-exclude __pycache__/*
1726
global-exclude *.pyc
1827
global-exclude *.pyo
28+
global-exclude *.pyd
1929

20-
# Version control
30+
# Version control - exclude everywhere
2131
global-exclude .git
22-
global-exclude .git/*
2332
global-exclude .gitignore
2433
global-exclude .gitattributes
2534
global-exclude .gitmodules
26-
prune **/.git
27-
prune **/.github
2835

2936
# IDE and editor files
3037
global-exclude *.ai
@@ -34,24 +41,52 @@ global-exclude *.swp
3441
global-exclude *.swo
3542
global-exclude *~
3643

37-
# JavaScript/Node (not needed for Python Qt library)
38-
global-exclude *.js
39-
global-exclude *.mjs
40-
global-exclude *.ts
41-
global-exclude *.d.ts
44+
# Prune icon submodule non-SVG directories
45+
prune fxgui/icons/fontawesome/js
46+
prune fxgui/icons/fontawesome/js-packages
47+
prune fxgui/icons/fontawesome/css
48+
prune fxgui/icons/fontawesome/less
49+
prune fxgui/icons/fontawesome/scss
50+
prune fxgui/icons/fontawesome/webfonts
51+
prune fxgui/icons/fontawesome/sprites
52+
prune fxgui/icons/fontawesome/metadata
53+
prune fxgui/icons/fontawesome/otfs
54+
prune fxgui/icons/fontawesome/.github
55+
56+
prune fxgui/icons/material/.github
57+
58+
prune fxgui/icons/simple/.github
59+
prune fxgui/icons/simple/.devcontainer
60+
prune fxgui/icons/simple/.husky
61+
prune fxgui/icons/simple/scripts
62+
prune fxgui/icons/simple/tests
63+
prune fxgui/icons/simple/data
64+
65+
# Exclude documentation/config files from submodules
66+
global-exclude README.md
67+
global-exclude CHANGELOG.md
68+
global-exclude CONTRIBUTING.md
69+
global-exclude CODE_OF_CONDUCT.md
70+
global-exclude UPGRADING.md
71+
global-exclude LICENSE.txt
4272
global-exclude package.json
4373
global-exclude package-lock.json
4474
global-exclude composer.json
4575
global-exclude yarn.lock
46-
global-exclude *.npmignore
76+
global-exclude .editorconfig
77+
global-exclude .prettierrc*
78+
global-exclude .prettierignore
79+
global-exclude .markdownlint*
80+
global-exclude .eslintrc*
4781
global-exclude .npmrc
4882
global-exclude .nvmrc
49-
global-exclude .node-version
50-
prune **/node_modules
51-
prune **/js
52-
prune **/js-packages
83+
global-exclude Dockerfile
84+
global-exclude .dockerignore
5385

54-
# Web assets (not needed)
86+
# Exclude all non-SVG assets
87+
global-exclude *.js
88+
global-exclude *.mjs
89+
global-exclude *.ts
5590
global-exclude *.css
5691
global-exclude *.less
5792
global-exclude *.scss
@@ -60,28 +95,5 @@ global-exclude *.woff2
6095
global-exclude *.ttf
6196
global-exclude *.eot
6297
global-exclude *.otf
63-
prune **/css
64-
prune **/webfonts
65-
prune **/less
66-
prune **/scss
67-
prune **/sprites
68-
prune **/metadata
69-
70-
# Documentation in submodules
71-
global-exclude CHANGELOG.md
72-
global-exclude CONTRIBUTING.md
73-
global-exclude CODE_OF_CONDUCT.md
74-
global-exclude PULL_REQUEST_TEMPLATE.md
75-
prune **/.github
76-
prune **/ISSUE_TEMPLATE
77-
78-
# Config/tooling files from submodules
79-
global-exclude .editorconfig
80-
global-exclude .prettierrc*
81-
global-exclude .prettierignore
82-
global-exclude .markdownlint*
83-
global-exclude .jsonschema.json
84-
global-exclude .dockerignore
85-
global-exclude Dockerfile
86-
prune **/.devcontainer
87-
prune **/.husky
98+
global-exclude *.json
99+
global-exclude *.txt

fxgui/examples.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -583,7 +583,9 @@ def update_episodic_colors(_theme_name: str = None):
583583
fuzzy_delegate.show_status_dot = True
584584
fuzzy_delegate.show_status_label = True
585585
fuzzy_tree.tree_view.setItemDelegate(fuzzy_delegate)
586-
fxwidgets.FXThumbnailDelegate.apply_transparent_selection(fuzzy_tree.tree_view)
586+
fxwidgets.FXThumbnailDelegate.apply_transparent_selection(
587+
fuzzy_tree.tree_view
588+
)
587589

588590
# Role for storing icon name for theme-aware updates
589591
FUZZY_ICON_NAME_ROLE = Qt.UserRole + 301

fxgui/fxstyle.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1121,13 +1121,8 @@ def load_stylesheet(
11211121
}}
11221122
"""
11231123

1124-
# Determine which icon folder to use based on theme surface luminance
1125-
# This allows custom themes to automatically get the right icon set
1126-
surface_color = theme_data.get("surface", "#302f2f")
1127-
surface_luminance = get_luminance(surface_color)
1128-
icon_folder = (
1129-
"stylesheet_dark" if surface_luminance < 0.5 else "stylesheet_light"
1130-
)
1124+
# Determine which icon folder to use based on theme brightness
1125+
icon_folder = "stylesheet_light" if is_light_theme() else "stylesheet_dark"
11311126

11321127
# Text color for accent backgrounds: use theme value if defined,
11331128
# otherwise compute based on each accent's luminance

fxgui/fxwidgets/__init__.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,12 @@
5656
from fxgui.fxwidgets._tag_input import FXTagChip, FXTagInput
5757
from fxgui.fxwidgets._timeline_slider import FXTimelineSlider
5858
from fxgui.fxwidgets._toggle_switch import FXToggleSwitch
59-
from fxgui.fxwidgets._tooltip import FXTooltip, FXTooltipPosition
59+
from fxgui.fxwidgets._tooltip import (
60+
FXTooltip,
61+
FXTooltipManager,
62+
FXTooltipPosition,
63+
set_tooltip,
64+
)
6065
from fxgui.fxwidgets._tree_items import FXSortedTreeWidgetItem
6166
from fxgui.fxwidgets._validators import (
6267
FXCamelCaseValidator,
@@ -117,7 +122,9 @@
117122
"FXTimelineSlider",
118123
"FXToggleSwitch",
119124
"FXTooltip",
125+
"FXTooltipManager",
120126
"FXTooltipPosition",
127+
"set_tooltip",
121128
"FXValidatedLineEdit",
122129
"FXWidget",
123130
"theme_manager",

fxgui/fxwidgets/_main_window.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
from qtpy.QtWidgets import QDesktopWidget
3333

3434
from fxgui import fxicons, fxstyle, fxutils
35+
from fxgui.fxwidgets._tooltip import FXTooltipManager
3536
from fxgui.fxwidgets._constants import (
3637
CRITICAL,
3738
ERROR,
@@ -131,6 +132,10 @@ def __init__(
131132
if self._set_stylesheet:
132133
self.setStyleSheet(fxstyle.load_stylesheet())
133134

135+
# Install the global FXTooltip manager for rich tooltips
136+
# This replaces standard Qt tooltips with FXTooltip for all widgets
137+
FXTooltipManager.install()
138+
134139
# Private methods
135140
def _load_ui(self) -> None:
136141
"""Load the UI from the specified UI file.

0 commit comments

Comments
 (0)