4530 Commits

Author SHA1 Message Date
Arjan Molenaar
7a6889adf5 -Item stffix is stripped from item names 2020-07-11 11:45:28 +02:00
Arjan Molenaar
b3cf3ccff9 Upgrade Gaphas to 2.1.1 2020-07-11 11:36:13 +02:00
Arjan Molenaar
19b8a63933 Parse CSS declarations using tinycss2 parser
Did not know that code was in tinycss2 as well.
2020-07-10 16:49:12 +02:00
Arjan Molenaar
8d995e8596 Ensure style sheet is compiled after loading 2020-07-10 16:44:56 +02:00
Arjan Molenaar
4b57b37865 Documentation updates on style sheets 2020-07-10 14:15:45 +02:00
Arjan Molenaar
4ddda24e84 Upgrade isort to 5.0.7 2020-07-10 12:05:07 +02:00
Arjan Molenaar
321f981e27 Add __init__ files to test folders
Avoid name conflicts
2020-07-10 11:48:40 +02:00
Arjan Molenaar
96c7a2a1c6 Move gaphorconvert to diagramexport package 2020-07-10 11:29:19 +02:00
Arjan Molenaar
8194acfb8a gaphorconvert now uses DiagramExport for exporting diagrams
No need to implement this in 2 places.
2020-07-10 11:27:50 +02:00
Arjan Molenaar
84848137d2 Apply line style to exported diagrams 2020-07-10 11:27:50 +02:00
Arjan Molenaar
7ae5f57f56 Fix text alignment for icon-like shapes
Remove vertical-align|spacing from fallback CSS.
2020-07-10 10:20:45 +02:00
Arjan Molenaar
b1cdf6ff7e Extend default (example) stylesheet 2020-07-10 10:04:32 +02:00
Arjan Molenaar
023eb3024d Remove border-radius from fallback style 2020-07-10 10:03:45 +02:00
Arjan Molenaar
3cf4f1e1c5 remove min-width|height from fallback style 2020-07-10 09:09:45 +02:00
Arjan Molenaar
e105548311 Remvove dash-style from fallback style 2020-07-10 09:03:54 +02:00
Arjan Molenaar
1d758da54a Only set default background of diagram items 2020-07-10 08:26:02 +02:00
Arjan Molenaar
6d4678e6db For CSS, make diagram the paren node of all items
Now I can change background color based on elements in the diagram:

    diagram:has(classitem) {
     background-color: beige;
    }
2020-07-10 08:24:51 +02:00
Arjan Molenaar
bf868d1747 Add docs on style sheets 2020-07-09 23:01:13 +02:00
Arjan Molenaar
f916a32185 Change sloppy range to -2.0 - 2.0 2020-07-09 23:00:47 +02:00
Arjan Molenaar
b8d9ac5124 Drop line style preference from preference window 2020-07-09 22:41:27 +02:00
Arjan Molenaar
74d4cfb6fa Configure line sloppyness from CSS 2020-07-09 22:41:05 +02:00
Arjan Molenaar
09ecb11e10 Add CSS declaration for line-style 2020-07-09 22:16:55 +02:00
Arjan Molenaar
c17a93927e Relax handling of CSS declarations
Fallback styles is only needed for diagram items.
2020-07-09 21:45:37 +02:00
Arjan Molenaar
f8ccfd1b21 Change diagram background color through CSS 2020-07-09 21:45:27 +02:00
Arjan Molenaar
79f588fc46 Remove dead code from DiagramPage 2020-07-08 22:54:13 +02:00
Arjan Molenaar
dd5b137e74 Set background on view, not scrolled window 2020-07-08 22:40:42 +02:00
Arjan Molenaar
3964dfda5b Rename focused and hovered pseudo classes to focus and hover
Since that's how it's defined for HTML as well.
2020-07-08 22:05:47 +02:00
Arjan Molenaar
c412f00840 Handle styling from diagram
Each item type should bring its own style node implementation (wrapper).
2020-07-08 21:54:40 +02:00
Arjan Molenaar
0c448e2d65 Simplify style sheet compilation 2020-07-08 16:48:55 +02:00
Arjan Molenaar
8fab0a97e4 Style match includes default style
Also defined a protocol for the style node.
2020-07-08 16:48:55 +02:00
Arjan Molenaar
4f25fcac0e Access diagram directly from Presentation
Makes more sense than going via the canvas
2020-07-08 16:48:55 +02:00
Arjan Molenaar
f4270b690f Style is no longer exposed via Presentation
* Require Gaphas 2.1.1 (master) code
* Everything styling related to gaphor.core.styling.
* Provide style data through update/draw contexts
* Style is requested via the diagram object
* Use Style type all around
2020-07-08 16:48:55 +02:00
Arjan Molenaar
76ed46da7f Explicit select protocol for element factory 2020-07-05 17:23:09 +02:00
Arjan Molenaar
851f457aa9 Use Gaphas master for a while 2020-07-05 17:23:09 +02:00
Arjan Molenaar
a48358c13a Access item state for a view
We want to know the state of all elements when processing CSS rules.

E.g. `node:active component {}`
2020-07-05 17:23:09 +02:00
Arjan Molenaar
b3c0bd1856 Add :focused CSS selector 2020-07-05 17:23:09 +02:00
Arjan Molenaar
123a5d839c Clean up some code 2020-07-05 17:23:09 +02:00
Arjan Molenaar
6db39e6bbd Merge branch 'chore/unused-imports' 2020-07-05 17:22:32 +02:00
Arjan Molenaar
049c9a4780
Merge pull request #356 from gaphor/faster-text-layout
Faster text layout
2020-07-05 17:19:41 +02:00
Dan Yeaw
485c93bbc7
Remove unused imports
Signed-off-by: Dan Yeaw <dan@yeaw.me>
2020-07-04 16:09:39 -04:00
Arjan Molenaar
57ce36a086 no need to "calculate" text position 2020-07-03 22:43:32 +02:00
Arjan Molenaar
6cedb73f92 Speed up rendering by reusing Pango Layouts 2020-07-03 21:24:07 +02:00
Arjan Molenaar
0c5310374e Add missing methods from ItemWrapper 2020-07-03 16:59:13 +02:00
Dan Yeaw
74e0c07460
Remove print statement
Signed-off-by: Dan Yeaw <dan@yeaw.me>
2020-07-03 10:50:49 -04:00
Dan Yeaw
cccea3b651
Merge pull request #355 from gaphor/css-selectors
CSS selectors
2020-07-03 10:48:59 -04:00
Dan Yeaw
00d94aaed0
Update lock file
Signed-off-by: Dan Yeaw <dan@yeaw.me>
2020-07-03 09:59:23 -04:00
Dan Yeaw
4559d549da
Merge branch 'master' into css-selectors
# Conflicts:
#	poetry.lock
2020-07-03 09:58:22 -04:00
Arjan Molenaar
c7aa93b1bb Treat pseudo-element as a normal parse class
No need for Selector class anymore.
2020-07-01 23:13:23 +02:00
Arjan Molenaar
c1f7de0735 Attributes can use dot notation
This is needed if we want to support nested attributes
2020-07-01 22:41:38 +02:00
Arjan Molenaar
eef0b20a8c Remove pseudo-class knowledge from parser module 2020-07-01 22:11:51 +02:00