Isaiah Odhner
055753b53a
Dynamically load properties when expanding
...
- Make the Tree into a subclass, PropertiesTree.
- Populate nodes when expanding a node instead of all at once.
- Remove the max_depth limit, since you now expand nodes manually.
- Remove cyclic reference detection, for now at least.
- Track already-loaded nodes/keys, like in the DOMTree, but with a data
structure. It's a little more complicated since unlike DOM nodes, a
value could appear multiple times in a list. But this should also
be more efficient.
2023-05-28 18:31:37 -04:00
Isaiah Odhner
f0ce14189c
Show more properties
2023-05-28 18:30:21 -04:00
Isaiah Odhner
3a447b4e70
Enable inspecting inspector
...
Layout is hard, but at least I have this nifty new tool...
2023-05-28 18:30:21 -04:00
Isaiah Odhner
e1d5739ec8
Use tabs for inspector details views
...
TODO: fix bottom of contents cut off when scrolled to bottom in TabPanes
2023-05-28 18:30:21 -04:00
Isaiah Odhner
c0f088dd4d
Hide "Expand All Visible" button since it's confusing
...
- I wanted it to expand all, not just one level
(but named it according to how it ended up functioning.)
- It's not that helpful since the Inspect Element feature works great.
- It's especially confusing now that there's multiple tree views.
It doesn't affect the Properties view, but it's not visually tied to
the DOM tree view except by proximity.
- I'd rather make the DOM tree default to (mostly) expanded, rather than
have a button you have to click, anyways.
2023-05-28 02:35:18 -04:00
Isaiah Odhner
b85fba8f15
Show actual DOM path, not just the css_identifier for the one node
2023-05-28 02:19:18 -04:00
Isaiah Odhner
0f9f394d26
Show info about event listeners, linking to source code
2023-05-28 01:33:23 -04:00
Isaiah Odhner
dba6721164
Inspect properties of DOM nodes
2023-05-28 00:08:12 -04:00
Isaiah Odhner
6b97dfc165
Optimize: don't reset highlight for nodes that should stay highlighted
2023-05-26 13:27:51 -04:00
Isaiah Odhner
2101092dbc
Refactor original styles storage to use a dictionary
...
This was only meant to be preparation for an optimization, but this
actually greatly improved performance!
2023-05-26 13:14:31 -04:00
Isaiah Odhner
d64054c197
Go ahead and handle NoWidget
2023-05-26 13:07:07 -04:00
Isaiah Odhner
dd4b96e624
Tint descendants since tint isn't inherited
2023-05-26 13:04:55 -04:00
Isaiah Odhner
bab23a3df7
Hide inspector by default
2023-05-26 13:04:55 -04:00
Isaiah Odhner
759991e902
Add DOM inspector panel
2023-05-26 13:04:55 -04:00
Isaiah Odhner
91bf2f1701
VS Code: configure indentation
...
I'm tired of creating new files and ending up with mixed indentation.
2023-05-25 22:52:46 -04:00
Isaiah Odhner
0fb8cce026
Improve layout of Edit Colors dialog
2023-05-25 22:43:36 -04:00
Isaiah Odhner
4ed14057f6
Allow only one selected color across both grids (Basic and Custom)
2023-05-25 17:08:10 -04:00
Isaiah Odhner
0372a99d27
Constrain window to screen so titlebar is always accessible
...
Otherwise a window that's too big to fit can't be closed!
2023-05-25 03:01:48 -04:00
Isaiah Odhner
f00c332c0c
Pick slot for new custom color by clicking in Custom Colors grid
2023-05-25 02:01:45 -04:00
Isaiah Odhner
33781fa53f
Fix color not updating when applying min/max constraints
...
self.last_valid_int needs to be set in these cases.
2023-05-25 01:42:53 -04:00
Isaiah Odhner
c94430feb5
Reset to last valid int on blur, not just 0, and don't update when empty
2023-05-25 01:34:36 -04:00
Isaiah Odhner
6f1476be8f
Handle min/max in IntegerInput, and fix flicker and invisible cursor
...
- Handle validation in one place.
- This fixes a flicker when typing an invalid character.
- This fixes the cursor becoming invisible after typing an invalid character, when the cursor was at the end, and thus the length of the text shrinks to where the cursor further to the right than the end of the text. (I'm guessing that the cursor position may not be updated in some way.)
2023-05-25 01:23:56 -04:00
Isaiah Odhner
3507d4267a
Reset color value inputs to 0 on blur
2023-05-25 01:08:29 -04:00
Isaiah Odhner
c19a3a2741
Cleanup unused imports
2023-05-25 00:32:56 -04:00
Isaiah Odhner
724fe814d1
Make @property _current_color
2023-05-25 00:27:49 -04:00
Isaiah Odhner
9eb5f87f22
Prevent changing focus ring when adding a custom color
2023-05-25 00:23:50 -04:00
Isaiah Odhner
3cbcc1002f
Implement Custom Colors
2023-05-24 23:59:32 -04:00
Isaiah Odhner
c01167c84f
Fill in inputs when editing a custom color
2023-05-24 23:23:39 -04:00
Isaiah Odhner
13485b4f79
Sync color grid with HSL state
2023-05-24 23:12:35 -04:00
Isaiah Odhner
4f00b95d1a
Use current HSL state when submitting Edit Colors
2023-05-24 23:03:48 -04:00
Isaiah Odhner
7e32bf68c1
Initialize color field and luminosity ramp with starting color
2023-05-24 22:54:47 -04:00
Isaiah Odhner
c636ae0d1b
Refactor _set_color_from_rgb to match _get_current_color
...
I might want to make this a @property; I've never used getters/setters
in Python before, but this seems like a good use case.
2023-05-24 22:39:43 -04:00
Isaiah Odhner
9b03ec2f34
Flip luminosity ramp
2023-05-24 22:25:33 -04:00
Isaiah Odhner
0a96a19c33
Preview hue and saturation on the luminosity ramp
2023-05-24 22:23:25 -04:00
Isaiah Odhner
058d54643b
Wire up luminosity ramp, color field, and color preview state
2023-05-24 22:18:44 -04:00
Isaiah Odhner
ddf40c5b81
Fix size for inputs in Edit Colors
2023-05-24 22:18:44 -04:00
Isaiah Odhner
fc1536fd8e
Start wiring up numeric color value inputs to state
2023-05-24 22:18:44 -04:00
Isaiah Odhner
cf979114a9
Refactor: remove class LabeledInput so it's easy to get at the Inputs
...
Now that I'm creating the inputs dynamically, it doesn't help to have a class for labeled inputs.
And `self._inputs_by_letter[component_letter] = labeled_inputs[-1].query_one(Input)` failed, because it's not mounted yet.
2023-05-24 00:56:45 -04:00
Isaiah Odhner
0fdbce1f77
Refactor: create numeric inputs dynamically
2023-05-24 00:54:23 -04:00
Isaiah Odhner
eee0d17916
Add color preview
2023-05-24 00:54:23 -04:00
Isaiah Odhner
d2ac30615a
Fix scaling of HSL ramps so that the cursor is visible at the maximums
2023-05-24 00:05:07 -04:00
Isaiah Odhner
8680c364dd
Clamp values
2023-05-23 23:52:45 -04:00
Isaiah Odhner
edaf7fb17a
Make ColorField and LuminosityRamp interactive
2023-05-23 23:52:45 -04:00
Isaiah Odhner
a515999937
Scaffold visual color inputs (Hue/Sat field and Lum slider)
2023-05-23 03:00:08 -04:00
Isaiah Odhner
272bcb3217
Scaffold numeric color value inputs
2023-05-23 03:00:08 -04:00
Isaiah Odhner
4c73395c0c
Tweak border
2023-05-23 00:06:02 -04:00
Isaiah Odhner
4d676409c0
Separate focused and selected states in Edit Colors
2023-05-22 23:51:34 -04:00
Isaiah Odhner
9ada90e92d
Fix behavior when navigating with arrows on duplicate color
2023-05-22 23:37:10 -04:00
Isaiah Odhner
2aea62bff5
Fix NoMatches crash if you tab to the color grid and then use arrows
2023-05-22 01:49:56 -04:00
Isaiah Odhner
d88885419c
Make color grid focusable, keyboard navigable; require clicking OK button
2023-05-22 01:43:23 -04:00