Bug 132692 - Opacity slider in template dialog has no effect
Summary: Opacity slider in template dialog has no effect
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: General (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-08-20 17:17 UTC by Thomas Zander
Modified: 2006-08-20 17:32 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Zander 2006-08-20 17:17:12 UTC
Version:           1.5.90 (1.6 Alpha 1) (using KDE 3.5.3, compiled sources)
Compiler:          Target: x86_64-linux-gnu
OS:                Linux (x86_64) release 2.6.17.6pavilion

Start Krita and use the 'Custom Document' screen.
Use slider and move it completely to the left. Near the word 'Transparant'.
Press create.

The result is a white document, while I expected the layer to have 100% transparency set (aka see the block-pattern)
Comment 1 Bart Coppens 2006-08-20 17:32:40 UTC
SVN commit 574937 by coppens:

Obey the transparancy setting in the custom image dialog. Note that it changes the opacity of the initial layer, not the fill color of it (just like it used to do before, iirc).

BUG:132692

 M  +11 -0     kis_custom_image_widget.cc  


--- branches/koffice/1.6/koffice/krita/ui/kis_custom_image_widget.cc #574936:574937
@@ -27,6 +27,9 @@
 #include "kis_cmb_idlist.h"
 #include "squeezedcombobox.h"
 #include "kis_color.h"
+#include "kis_image.h"
+#include "kis_layer.h"
+
 #include <kcolorcombo.h>
 
 #include <kdebug.h>
@@ -51,6 +54,7 @@
     connect(cmbColorSpaces, SIGNAL(activated(const KisID &)),
         this, SLOT(fillCmbProfiles(const KisID &)));
     connect (m_createButton, SIGNAL( clicked() ), this, SLOT (buttonClicked()) );
+    m_createButton -> setDefault(true);
 
     fillCmbProfiles(cmbColorSpaces->currentItem());
 
@@ -62,6 +66,13 @@
     QColor qc(cmbColor->color());
 
     m_doc->newImage(txtName->text(), (Q_INT32)intWidth->value(), (Q_INT32)intHeight->value(), cs, KisColor(qc, cs), txtDescription->text(), doubleResolution->value());
+    KisImageSP img = m_doc->currentImage();
+    if (img) {
+        KisLayerSP layer = img->activeLayer();
+        if (layer) {
+            layer->setOpacity(backgroundOpacity());
+        }
+    }
     emit documentSelected();
 }