View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0014473 | Scribus | Canvas | public | 2016-12-14 10:11 | 2025-01-06 18:03 |
Reporter | Nauty | Assigned To | nitramr | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | fixed | ||
OS | Windows | OS Version | Win7 64bit | ||
Product Version | 1.5.2 | ||||
Target Version | 1.6.3.svn | Fixed in Version | 1.6.3.svn | ||
Summary | 0014473: Opacity value in Layers palette not working if only one layer | ||||
Description | Changing the opacity value in Layers palette, with only one layer, not working. Same issue in Scribus_1.5.3 svn (win20161211). | ||||
Steps To Reproduce | 1) Open a new document 2) Draw a rectangle and assign a fill colour. 3) In "Layers Palette" with only one layer ("Background") change the opacity value to 30% (or something else value) but the rectangle not change opacity. 4) Create a new layer ("NewLayer1"),... and the opacity on the "Background" layer work. 5) Delete a layer "NewLayer1" and the opacity on the "Background" layer not work. When the layer is one the opacity not working. | ||||
Tags | layers | ||||
Patch | Yes | ||||
|
Confirmed with 1.5.3.svn (21644). |
|
This still seems like an issue in 1.6.2 |
|
issue still present in 1.7.0-r26264 as well |
|
The opacity of the layer is set correctly because the PDF export also shows the correct opacity. In canvas.cpp there is a filter that only takes the opacity into account if the number of layers is greater than 1. I set the filter to >0. Patch works for 1.6.3 and 1.7.0 layeropacity_2024-12-29_01.patch (1,747 bytes)
Index: scribus/canvas.cpp =================================================================== --- scribus/canvas.cpp (Revision 26546) +++ scribus/canvas.cpp (Arbeitskopie) @@ -1368,7 +1368,7 @@ PageItem *currItem; ScPage* Mp = m_doc->MasterPages.at(m_doc->MasterNames[page->masterPageName()]); int layerCount = m_doc->layerCount(); - if ((layerCount > 1) && ((layer.blendMode != 0) || (layer.transparency != 1.0)) && (!layer.outlineMode)) + if ((layerCount > 0) && ((layer.blendMode != 0) || (layer.transparency != 1.0)) && (!layer.outlineMode)) painter->beginLayer(layer.transparency, layer.blendMode); int pageFromMasterCount = page->FromMaster.count(); for (int a = 0; a < pageFromMasterCount; ++a) @@ -1441,7 +1441,7 @@ currItem->BoundingY = oldBY; } } - if ((layerCount > 1) && ((layer.blendMode != 0) || (layer.transparency != 1.0)) && (!layer.outlineMode)) + if ((layerCount > 0) && ((layer.blendMode != 0) || (layer.transparency != 1.0)) && (!layer.outlineMode)) painter->endLayer(); } @@ -1468,7 +1468,7 @@ PageItem *currItem { nullptr }; int layerCount = m_doc->layerCount(); int docCurrPageNo = m_doc->currentPageNumber(); - if ((layerCount > 1) && ((layer.blendMode != 0) || (layer.transparency != 1.0)) && (!layer.outlineMode)) + if ((layerCount > 0) && ((layer.blendMode != 0) || (layer.transparency != 1.0)) && (!layer.outlineMode)) painter->beginLayer(layer.transparency, layer.blendMode); //if notes are used @@ -1539,7 +1539,7 @@ } } } - if ((layerCount > 1) && ((layer.blendMode != 0) || (layer.transparency != 1.0)) && (!layer.outlineMode)) + if ((layerCount > 0) && ((layer.blendMode != 0) || (layer.transparency != 1.0)) && (!layer.outlineMode)) painter->endLayer(); } |
|
Well played! |
|
Layer count is always >0, so "(layerCount > 0) && " can just be removed. I think the question is whether it makes sense to have a single layer document with layer opacity <100%. |
|
well, @Nauty could tell us, why they are missing the option to do so... |
|
at least it's not really essential. you can always add an empty layer below the rest… |
|
Sorry for the great late and thanks for all the replies. @cbradney wrote: "I think the question is whether it makes sense to have a single layer document with layer opacity <100%." Yes, you are right. I usually use a lot of Layers but in an one specific case I used an only Layer with Opacity=75%, and the behaviour was strange. Like I wrote in the point 0000004 "Steps To Reproduce", and @utnik replied, the solution is very easy: add an empty new layer. But, I think, a note should be written somewhere,... in the Manual? (maybe it is always there) |
|
Regardless of the workaround, there is a problem. If you follow steps 1-3 and export the document as PDF, you can see the transparency in the PDF document but not on the canvas. There is no transparency when exporting images either. A valid solution would be to 1. enable transparency on the canvas for a single layer document OR 2. ignore transparency when exporting to PDF for a single layer document |
|
On top of it: if Scribus does not support setting the opacity of a single layer (because it does not make sense), then it should not be possible to set the opacity (and probably the blend mode) in the UI when there is only one layer (Scribus should show 100% or nothing) |
|
>> then it should not be possible to set the opacity Makes sense for other features too. Here's a suggestion # No layer effects for 1-layer documents - The last layer retains all properties (transparency, blend mode, etc.), and also when saving the document - Editing options for transparency and blend mode are disabled in the UI, but show the correct values - The effects are ignored when exporting (PDF, image, etc.) and also on the canvas for the layer and replaced with default values # Keep layer effects for 1-layer documents - Canvas displays the transparency and blend modes correctly (I think the image export uses the same drawing function) Test Case: You have a document with 3 layers (background, layer 1 and 2). Layers 1 and 2 have transparency, the background does not. Now you delete the background layer and layer 1 (layer 2 with transparency remains), what happens then? I think before we can move on, we need to decide how the last layer should behave. |
|
I do not really see why it would make sense to prevent user to set opacity on a single layer document. So patch committed (with the layer > 0 removed). Thanks Martin! |
|
Thank you so much! I will try to the next release. |
Date Modified | Username | Field | Change |
---|---|---|---|
2016-12-14 10:11 | Nauty | New Issue | |
2016-12-14 17:18 | FirasH | Status | new => confirmed |
2016-12-14 17:18 | FirasH | Note Added: 0043003 | |
2016-12-15 00:47 | Kunda | Tag Attached: layers | |
2016-12-15 00:49 | Kunda | Target Version | => Future Release - High Priority |
2024-12-29 13:08 | luzpaz | Note Added: 0051833 | |
2024-12-29 16:13 | utnik | Note Added: 0051834 | |
2024-12-29 16:54 | nitramr | Note Added: 0051835 | |
2024-12-29 16:54 | nitramr | File Added: layeropacity_2024-12-29_01.patch | |
2024-12-29 16:55 | nitramr | Assigned To | => nitramr |
2024-12-29 16:55 | nitramr | Status | confirmed => assigned |
2024-12-29 16:55 | nitramr | Category | General => Canvas |
2024-12-29 16:55 | nitramr | Target Version | Future Release - High Priority => 1.6.3.svn |
2024-12-29 16:55 | nitramr | Patch | No => Yes |
2024-12-29 19:29 | luzpaz | Note Added: 0051836 | |
2024-12-29 21:19 | cbradney | Note Added: 0051837 | |
2025-01-02 20:19 | cbradney | Assigned To | nitramr => jghali |
2025-01-03 06:57 | ale | Note Added: 0051853 | |
2025-01-03 07:10 | utnik | Note Added: 0051854 | |
2025-01-04 10:13 | Nauty | Note Added: 0051866 | |
2025-01-04 11:15 | nitramr | Note Added: 0051867 | |
2025-01-04 11:21 | ale | Note Added: 0051868 | |
2025-01-04 12:00 | nitramr | Note Added: 0051869 | |
2025-01-04 16:43 | jghali | Assigned To | jghali => nitramr |
2025-01-04 16:43 | jghali | Status | assigned => resolved |
2025-01-04 16:43 | jghali | Resolution | open => fixed |
2025-01-04 16:43 | jghali | Fixed in Version | => 1.6.3.svn |
2025-01-04 16:43 | jghali | Note Added: 0051870 | |
2025-01-04 20:00 | Nauty | Note Added: 0051871 | |
2025-01-06 18:03 | cbradney | Status | resolved => closed |