diff --git a/data/skins/default/sheet.png b/data/skins/default/sheet.png
index 70df31167..50bcfa39a 100644
Binary files a/data/skins/default/sheet.png and b/data/skins/default/sheet.png differ
diff --git a/data/skins/default/skin.xml b/data/skins/default/skin.xml
index 73a7d210e..ce62b35e2 100644
--- a/data/skins/default/skin.xml
+++ b/data/skins/default/skin.xml
@@ -375,9 +375,10 @@
-
-
-
+
+
+
+
diff --git a/src/app/tools/ink_type.h b/src/app/tools/ink_type.h
index 3a338ff3a..984359000 100644
--- a/src/app/tools/ink_type.h
+++ b/src/app/tools/ink_type.h
@@ -14,11 +14,17 @@ namespace tools {
enum class InkType {
DEFAULT = 0,
- ALPHA_COMPOSITING = 0,
- COPY_COLOR = 1,
- LOCK_ALPHA = 2,
+ SIMPLE = 0,
+ ALPHA_COMPOSITING = 1,
+ COPY_COLOR = 2,
+ LOCK_ALPHA = 3,
};
+ inline bool inkHasOpacity(InkType inkType) {
+ return (inkType == InkType::ALPHA_COMPOSITING ||
+ inkType == InkType::LOCK_ALPHA);
+ }
+
} // namespace tools
} // namespace app
diff --git a/src/app/ui/context_bar.cpp b/src/app/ui/context_bar.cpp
index a14f720db..b811b2524 100644
--- a/src/app/ui/context_bar.cpp
+++ b/src/app/ui/context_bar.cpp
@@ -325,15 +325,16 @@ public:
InkTypeField(ContextBar* owner) : ButtonSet(1)
, m_owner(owner) {
SkinTheme* theme = SkinTheme::instance();
- addItem(theme->parts.inkDefault());
+ addItem(theme->parts.inkSimple());
}
void setInkType(InkType inkType) {
SkinTheme* theme = SkinTheme::instance();
- SkinPartPtr part = theme->parts.inkDefault();
+ SkinPartPtr part = theme->parts.inkSimple();
switch (inkType) {
- case InkType::ALPHA_COMPOSITING: part = theme->parts.inkDefault(); break;
+ case InkType::SIMPLE: part = theme->parts.inkSimple(); break;
+ case InkType::ALPHA_COMPOSITING: part = theme->parts.inkAlphaCompositing(); break;
case InkType::COPY_COLOR: part = theme->parts.inkCopyColor(); break;
case InkType::LOCK_ALPHA: part = theme->parts.inkLockAlpha(); break;
}
@@ -349,10 +350,12 @@ protected:
Menu menu;
MenuItem
+ simple("Simple Ink"),
alphacompo("Alpha Compositing"),
copycolor("Copy Color+Alpha"),
lockalpha("Lock Alpha"),
alltools("Same in all Tools");
+ menu.addChild(&simple);
menu.addChild(&alphacompo);
menu.addChild(©color);
menu.addChild(&lockalpha);
@@ -361,12 +364,14 @@ protected:
Tool* tool = App::instance()->activeTool();
switch (Preferences::instance().tool(tool).ink()) {
+ case tools::InkType::SIMPLE: simple.setSelected(true); break;
case tools::InkType::ALPHA_COMPOSITING: alphacompo.setSelected(true); break;
case tools::InkType::COPY_COLOR: copycolor.setSelected(true); break;
case tools::InkType::LOCK_ALPHA: lockalpha.setSelected(true); break;
}
alltools.setSelected(Preferences::instance().shared.shareInk());
+ simple.Click.connect(Bind(&InkTypeField::selectInk, this, InkType::SIMPLE));
alphacompo.Click.connect(Bind(&InkTypeField::selectInk, this, InkType::ALPHA_COMPOSITING));
copycolor.Click.connect(Bind(&InkTypeField::selectInk, this, InkType::COPY_COLOR));
lockalpha.Click.connect(Bind(&InkTypeField::selectInk, this, InkType::LOCK_ALPHA));
@@ -1184,7 +1189,7 @@ void ContextBar::updateForTool(tools::Tool* tool)
m_inkOpacity->setTextf("%d", toolPref->opacity());
hasInkWithOpacity =
- ((isPaint && toolPref->ink() != tools::InkType::COPY_COLOR) ||
+ ((isPaint && tools::inkHasOpacity(toolPref->ink())) ||
(isEffect));
m_freehandAlgo->setFreehandAlgorithm(toolPref->freehandAlgorithm());
diff --git a/src/app/ui/editor/editor.cpp b/src/app/ui/editor/editor.cpp
index 4f324a3b5..c242a5ccb 100644
--- a/src/app/ui/editor/editor.cpp
+++ b/src/app/ui/editor/editor.cpp
@@ -928,6 +928,18 @@ tools::Ink* Editor::getCurrentEditorInk()
const char* id = NULL;
switch (inkType) {
+
+ case tools::InkType::SIMPLE: {
+ id = tools::WellKnownInks::Paint;
+
+ ColorBar* colorbar = ColorBar::instance();
+ app::Color color = (m_secondaryButton ? colorbar->getBgColor():
+ colorbar->getFgColor());
+ if (color.getAlpha() == 0)
+ id = tools::WellKnownInks::PaintCopy;
+ break;
+ }
+
case tools::InkType::ALPHA_COMPOSITING:
id = tools::WellKnownInks::Paint;
break;
diff --git a/src/app/ui/editor/tool_loop_impl.cpp b/src/app/ui/editor/tool_loop_impl.cpp
index e54c8c2d6..ea40904cb 100644
--- a/src/app/ui/editor/tool_loop_impl.cpp
+++ b/src/app/ui/editor/tool_loop_impl.cpp
@@ -134,6 +134,10 @@ public:
break;
}
}
+
+ // Ignore opacity for these inks
+ if (!tools::inkHasOpacity(m_toolPref.ink()))
+ m_opacity = 255;
}
// IToolLoop interface