View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0017676 | Scribus | Scripter | public | 2025-11-01 21:07 | 2025-11-05 17:36 |
| Reporter | ale | Assigned To | cbradney | ||
| Priority | normal | Severity | minor | Reproducibility | always |
| Status | resolved | Resolution | fixed | ||
| Product Version | 1.7.1.svn | ||||
| Fixed in Version | 1.7.1.svn | ||||
| Summary | 0017676: In the scripter's createParagraphStyle(), the tabs definition does not respect the current unit | ||||
| Description | In a script, when defining a paragraph style, the list of tabs is always defined in pt and not in the current unit. | ||||
| Tags | No tags attached. | ||||
| Patch | No | ||||
|
|
I have added a unit parameter like other functions have so you can select it |
|
|
Not sure it's a good idea. If i get it correctly, now there is an optional argument "unit" for createParagraphStyle() and it only applies for defining the tabs. For all the other measurement that can be defined for createParagraphStyle() the unit is... well, one must try : - ) I really think that it would be better if createParagraphStyle() would use the currentUnit for all values that are shown in the current unit in the UI. This is what I expected, when trying to create the tabs. And this is how most command in the scripter work. |
|
|
Ok.. new code in now does this |
|
|
Works well, thanks. As a reference, for the time being, scripts will need to check for the Scribus version:
style_tabs = []
position = 10 # 10 current units
if scribus.SCRIBUS_VERSION_INFO[:3] < (1, 7, 1):
# Before 1.7.1, the tabs position was always in pt
position = position * 2.835
style_tabs.append((position))
scribus.createParagraphStyle(name='style with tabs', tabs=style_tabs)
(but I don't think that many people have written scripts that define tabs... otherwise, there would already have been a bug report : - ) |
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2025-11-01 21:07 | ale | New Issue | |
| 2025-11-03 19:55 | cbradney | Note Added: 0053169 | |
| 2025-11-03 19:55 | cbradney | Assigned To | => cbradney |
| 2025-11-03 19:55 | cbradney | Status | new => resolved |
| 2025-11-03 19:55 | cbradney | Resolution | open => fixed |
| 2025-11-03 19:55 | cbradney | Fixed in Version | => 1.7.1.svn |
| 2025-11-03 20:21 | ale | Note Added: 0053170 | |
| 2025-11-03 20:42 | cbradney | Note Added: 0053171 | |
| 2025-11-05 17:10 | ale | Note Added: 0053173 | |
| 2025-11-05 17:36 | ale | Note Edited: 0053173 |