Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3a9d2e4d13 | ||
|
|
63ffa15123 | ||
|
|
3de7a3746f | ||
|
|
53268107d5 | ||
|
|
d2d04ade5b | ||
|
|
083dbaded6 | ||
|
|
6927c4cf08 | ||
|
|
2c1626da05 | ||
|
|
ea611827ea | ||
|
|
8231e746c2 | ||
|
|
917bdb9f90 | ||
|
|
8ac5abbd8c | ||
|
|
624fd7bb67 | ||
|
|
33765cdef1 | ||
|
|
b3b9365bda | ||
|
|
2fdfab926b | ||
|
|
28c9a74221 | ||
|
|
a9b2386cc4 | ||
|
|
657f7594f1 | ||
|
|
4dd56a8c3c | ||
|
|
89f04d677f | ||
|
|
e83daa8424 | ||
|
|
82b4f4215f | ||
|
|
caffa54137 | ||
|
|
7285b7948d |
No files matched your search
@@ -1,14 +1,23 @@
|
||||
# Color Picker
|
||||
|
||||
One Color Picker to rule them all! No overhelming menus and settings. Just a dialog with all the features you'll need:
|
||||
* Pick a color
|
||||
One Color Picker to rule them all! No overhelming menus or settings. An easy tool with the features you need.
|
||||
|
||||
Features:
|
||||
* Pick a color with the zoomable Magnifier
|
||||
* Choose between multiple Color Formats
|
||||
* Let the Color History remember your last colors
|
||||
|
||||

|
||||
|
||||
## Appcenter
|
||||
Color Picker will be soon available on [Appcenter](https://github.com/elementary/appcenter)!
|
||||
## Installation
|
||||
On elementaryOS? Simply install Color Picker from AppCenter:
|
||||
<p align="center">
|
||||
<a href="https://appcenter.elementary.io/com.github.ronnydo.colorpicker">
|
||||
<img src="https://appcenter.elementary.io/badge.svg" alt="Get it on AppCenter">
|
||||
</a>
|
||||
</p>
|
||||
|
||||
Otherwise you can download and install the [latest .deb file](https://github.com/ronnydo/colorpicker/releases/latest).
|
||||
|
||||
## Dependencies
|
||||
You'll need the following dependencies to build:
|
||||
@@ -18,7 +27,7 @@ You'll need the following dependencies to build:
|
||||
* valac
|
||||
|
||||
## Build, Install and Run
|
||||
Call in the projects root folder:
|
||||
Call in the project's root folder:
|
||||
|
||||
meson build && cd build
|
||||
mesonconf -Dprefix=/usr
|
||||
|
||||
@@ -1,32 +1,143 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- Copyright 2017 Ronny Dobra <ronnydobra at arcor dot de> -->
|
||||
<component type="desktop">
|
||||
<id>com.github.ronnydo.colorpicker.desktop</id>
|
||||
<metadata_license>CC0-1.0</metadata_license>
|
||||
<project_license>GPL-3.0+</project_license>
|
||||
<name>Color Picker</name>
|
||||
<summary>The most intuitive Color Picker to speed up your workflow.</summary>
|
||||
<description>
|
||||
<p>One Color Picker to rule them all! No overhelming menus and settings. Just a dialog with all the features you'll need:</p>
|
||||
<ul>
|
||||
<li>Pick a color</li>
|
||||
<li>Choose between multiple <b>Color Formats</b></li>
|
||||
<li>Let the <b>Color History</b> remember your last colors</li>
|
||||
</ul>
|
||||
</description>
|
||||
<provides>
|
||||
<binary>com.github.ronnydo.colorpicker</binary>
|
||||
</provides>
|
||||
<screenshots>
|
||||
<screenshot type="default">
|
||||
<image>https://raw.githubusercontent.com/ronnydo/colorpicker/master/data/screenshot.png</image>
|
||||
</screenshot>
|
||||
</screenshots>
|
||||
<developer_name>Ronny Dobra</developer_name>
|
||||
<url type="homepage">https://github.com/RonnyDo/ColorPicker</url>
|
||||
<url type="bugtracker">https://github.com/RonnyDo/ColorPicker/issues</url>
|
||||
<custom>
|
||||
<value key="x-appcenter-color-primary">#A3FF91</value>
|
||||
<value key="x-appcenter-color-primary-text">#333333</value>
|
||||
</custom>
|
||||
</component>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- Copyright 2017 Ronny Dobra <ronnydobra at arcor dot de> -->
|
||||
<component type="desktop">
|
||||
<id>com.github.ronnydo.colorpicker.desktop</id>
|
||||
<metadata_license>CC0-1.0</metadata_license>
|
||||
<project_license>GPL-3.0+</project_license>
|
||||
<name>Color Picker</name>
|
||||
<summary>The most intuitive Color Picker to speed up your workflow</summary>
|
||||
<description>
|
||||
<p>One Color Picker to rule them all! No overhelming menus or settings. An easy tool with the features you need.</p>
|
||||
<p>Features:</p>
|
||||
<ul>
|
||||
<li>Pick a color with the zoomable Magnifier</li>
|
||||
<li>Choose between multiple Color Formats</li>
|
||||
<li>Let the Color History remember your last colors</li>
|
||||
</ul>
|
||||
</description>
|
||||
<categories>
|
||||
<category>GTK</category>
|
||||
<category>Utility</category>
|
||||
<category>Graphics</category>
|
||||
<category>Development</category>
|
||||
</categories>
|
||||
<releases>
|
||||
<release version="1.0.2" date="2017-08-20" urgency="medium">
|
||||
<description>
|
||||
<ul>
|
||||
<li>Implement "Don't add the same color to color history twice" (issue #24)</li>
|
||||
</ul>
|
||||
</description>
|
||||
</release>
|
||||
<release version="1.0.1" date="2017-07-13" urgency="medium">
|
||||
<description>
|
||||
<ul>
|
||||
<li>Improvements to avoid issue #19</li>
|
||||
</ul>
|
||||
</description>
|
||||
</release>
|
||||
<release version="1.0.0" date="2017-07-07" urgency="medium">
|
||||
<description>
|
||||
<ul>
|
||||
<li>Main Release!</li>
|
||||
<li>Implement magnifier (issue #12)</li>
|
||||
<li>Use your mousewheel to zoom the magnifier in and out.</li>
|
||||
<li>Invalid AppData file (issue #17)</li>
|
||||
<li>Code cleanup</li>
|
||||
</ul>
|
||||
</description>
|
||||
</release>
|
||||
<release version="0.9.5" date="2017-06-27" urgency="medium">
|
||||
<description>
|
||||
<ul>
|
||||
<li>Fix dark color scheme bug (issue #13)</li>
|
||||
<li>Enhance project description</li>
|
||||
</ul>
|
||||
</description>
|
||||
</release>
|
||||
<release version="0.9.4" date="2017-06-26" urgency="medium">
|
||||
<description>
|
||||
<ul>
|
||||
<li>Fix build bug (issue #16)</li>
|
||||
</ul>
|
||||
</description>
|
||||
</release>
|
||||
<release version="0.9.3" date="2017-06-26" urgency="medium">
|
||||
<description>
|
||||
<ul>
|
||||
<li>Color Picker now restores your recent window position, color format and color history! (issue #10, issue #11 and issue #15)</li>
|
||||
<li>Minor icon changes</li>
|
||||
</ul>
|
||||
</description>
|
||||
</release>
|
||||
<release version="0.9.2" date="2017-06-23" urgency="low">
|
||||
<description>
|
||||
<ul>
|
||||
<li>Fix issue #8</li>
|
||||
</ul>
|
||||
</description>
|
||||
</release>
|
||||
<release version="0.9.1" date="2017-06-23" urgency="low">
|
||||
<description>
|
||||
<ul>
|
||||
<li>Fix issue #8</li>
|
||||
</ul>
|
||||
</description>
|
||||
</release>
|
||||
<release version="0.9.0" date="2017-06-22" urgency="medium">
|
||||
<description>
|
||||
<ul>
|
||||
<li>Beta release</li>
|
||||
<li>Fix issue #4</li>
|
||||
<li>Fix issue #5</li>
|
||||
<li>Fix issue #6</li>
|
||||
<li>Fix issue #7</li>
|
||||
<li>Update icons</li>
|
||||
<li>Add German translation</li>
|
||||
</ul>
|
||||
</description>
|
||||
</release>
|
||||
<release version="0.1.2" date="2017-06-21" urgency="low">
|
||||
<description>
|
||||
<ul>
|
||||
<li>Fix build information</li>
|
||||
</ul>
|
||||
</description>
|
||||
</release>
|
||||
<release version="0.1.1" date="2017-06-19" urgency="low">
|
||||
<description>
|
||||
<ul>
|
||||
<li>Added debian files and logo files</li>
|
||||
</ul>
|
||||
</description>
|
||||
</release>
|
||||
<release version="0.1.0" date="2017-06-15" urgency="low">
|
||||
<description>
|
||||
<ul>
|
||||
<li>First official release</li>
|
||||
</ul>
|
||||
</description>
|
||||
</release>
|
||||
<release version="1.0" date="2012-08-26"/>
|
||||
</releases>
|
||||
<provides>
|
||||
<binary>com.github.ronnydo.colorpicker</binary>
|
||||
</provides>
|
||||
<screenshots>
|
||||
<screenshot type="default">
|
||||
<caption>Normal variant</caption>
|
||||
<image>https://raw.githubusercontent.com/ronnydo/colorpicker/master/data/screenshot.png</image>
|
||||
</screenshot>
|
||||
<screenshot>
|
||||
<caption>Dark variant</caption>
|
||||
<image>https://raw.githubusercontent.com/ronnydo/colorpicker/master/data/screenshot_dark.png</image>
|
||||
</screenshot>
|
||||
</screenshots>
|
||||
<developer_name>Ronny Dobra</developer_name>
|
||||
<url type="homepage">https://github.com/RonnyDo/ColorPicker</url>
|
||||
<url type="bugtracker">https://github.com/RonnyDo/ColorPicker/issues</url>
|
||||
<custom>
|
||||
<value key="x-appcenter-color-primary">#A3FF91</value>
|
||||
<value key="x-appcenter-color-primary-text">#333333</value>
|
||||
</custom>
|
||||
</component>
|
||||
@@ -1,9 +1,9 @@
|
||||
[Desktop Entry]
|
||||
Name=Color Picker
|
||||
Comment=The one and only Color Picker to speed up professionals workflow.
|
||||
Comment=An intuitive Color Picker
|
||||
Exec=com.github.ronnydo.colorpicker
|
||||
Icon=com.github.ronnydo.colorpicker
|
||||
Keywords=color;picker;selector;pipette;
|
||||
Keywords=colorpicker;color;picker;selector;pipette;
|
||||
Terminal=false
|
||||
Type=Application
|
||||
Categories=GTK;Utility;Graphics;Development;
|
||||
@@ -0,0 +1,32 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<schemalist>
|
||||
<schema path="/com/github/ronnydo/colorpicker/"
|
||||
id="com.github.ronnydo.colorpicker"
|
||||
gettext-domain="com.github.ronnydo.colorpicker">
|
||||
<key name="window-x" type="i">
|
||||
<default>-1</default>
|
||||
<summary>Most recent x position of app window</summary>
|
||||
<description>Most recent x position of app window</description>
|
||||
</key>
|
||||
<key name="window-y" type="i">
|
||||
<default>-1</default>
|
||||
<summary>Most recent y position of app window</summary>
|
||||
<description>Most recent y position of app window</description>
|
||||
</key>
|
||||
<key name="color-format-index" type="i">
|
||||
<default>2</default>
|
||||
<summary>Most recent index of selected color format</summary>
|
||||
<description>Most recent index of selected color format</description>
|
||||
</key>
|
||||
<key name="color-history" type="as">
|
||||
<default>[]</default>
|
||||
<summary>Color History</summary>
|
||||
<description>Color History</description>
|
||||
</key>
|
||||
<key name="zoomlevel" type="i">
|
||||
<default>3</default>
|
||||
<summary>Most recent zoomlevel of the picker's magnifier.</summary>
|
||||
<description>Most recent zoomlevel of the picker's magnifier.</description>
|
||||
</key>
|
||||
</schema>
|
||||
</schemalist>
|
||||
@@ -24,20 +24,32 @@
|
||||
guidetolerance="10"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="899"
|
||||
inkscape:window-width="1631"
|
||||
inkscape:window-height="961"
|
||||
id="namedview52"
|
||||
showgrid="false"
|
||||
showguides="false"
|
||||
inkscape:zoom="0.99999999"
|
||||
inkscape:cx="33.679442"
|
||||
inkscape:cy="104.75812"
|
||||
inkscape:zoom="2.8284271"
|
||||
inkscape:cx="56.890517"
|
||||
inkscape:cy="94.44466"
|
||||
inkscape:window-x="1665"
|
||||
inkscape:window-y="30"
|
||||
inkscape:window-maximized="0"
|
||||
inkscape:current-layer="svg5644" />
|
||||
<defs
|
||||
id="defs5646">
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
id="linearGradient4189">
|
||||
<stop
|
||||
style="stop-color:#f7f7f7;stop-opacity:1"
|
||||
offset="0"
|
||||
id="stop4191" />
|
||||
<stop
|
||||
style="stop-color:#f2f2f2;stop-opacity:1"
|
||||
offset="1"
|
||||
id="stop4193" />
|
||||
</linearGradient>
|
||||
<radialGradient
|
||||
r="62.769119"
|
||||
fy="193.04066"
|
||||
@@ -179,6 +191,15 @@
|
||||
gradientUnits="userSpaceOnUse"
|
||||
id="radialGradient3163-0-2-6"
|
||||
xlink:href="#linearGradient3820-7-2-8-6" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient4189"
|
||||
id="linearGradient4195"
|
||||
x1="71.374176"
|
||||
y1="40.012909"
|
||||
x2="71.374176"
|
||||
y2="97.085487"
|
||||
gradientUnits="userSpaceOnUse" />
|
||||
</defs>
|
||||
<metadata
|
||||
id="metadata5649">
|
||||
@@ -315,19 +336,21 @@
|
||||
</g>
|
||||
<g
|
||||
id="g4667"
|
||||
transform="matrix(0.95399968,0,0,0.95399968,-3.7442232,0.37868768)">
|
||||
transform="matrix(0.95399968,0,0,0.95399968,-3.7442232,0.37868768)"
|
||||
style="fill-opacity:1;fill:url(#linearGradient4195)">
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
style="fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:0.34900001;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
style="fill:url(#linearGradient4195);fill-opacity:1;stroke:none;stroke-width:0.34900001;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="m 97.330311,42.284792 a 7.0356347,7.1986844 39.729891 0 0 -3.278971,-1.929288 7.0356347,7.1986844 39.729891 0 0 -6.812034,1.857219 l -0.0015,-0.0015 -6.337307,6.363917 -2.41292,-2.423051 c -1.365731,-1.371466 -3.564848,-1.371466 -4.930579,0 -1.365732,1.371466 -1.365732,3.579818 0,4.951284 l 14.756822,14.818785 c 1.365732,1.371467 3.56485,1.371467 4.930581,0 1.365731,-1.371466 1.365731,-3.579816 0,-4.951282 l -2.41292,-2.423052 6.337307,-6.363916 -0.0034,-0.0034 a 7.0356347,7.1986844 39.729891 0 0 1.851392,-6.838692 7.0356347,7.1986844 39.729891 0 0 -1.686523,-3.057054 z"
|
||||
id="rect8140-3-36" />
|
||||
<g
|
||||
transform="matrix(0.88241267,0,0,0.88241267,14.536297,13.778944)"
|
||||
id="g4284">
|
||||
id="g4284"
|
||||
style="fill-opacity:1;fill:url(#linearGradient4195)">
|
||||
<path
|
||||
id="rect8172-9-2-12"
|
||||
d="m 66.974129,47.701228 -26.992865,27.106208 -0.0077,0.0077 0.0023,0.0023 -7.963775,15.460251 3.818679,3.834713 15.395056,-7.997766 0.0023,0.0023 0.0077,-0.0077 L 78.228591,59.002947 66.974236,47.701336 Z"
|
||||
style="fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:0.34900001;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
style="fill:url(#linearGradient4195);fill-opacity:1;stroke:none;stroke-width:0.34900001;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
inkscape:connector-curvature="0" />
|
||||
</g>
|
||||
</g>
|
||||
|
||||
|
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 18 KiB |
@@ -24,20 +24,32 @@
|
||||
guidetolerance="10"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="842"
|
||||
inkscape:window-height="961"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:window-height="962"
|
||||
id="namedview52"
|
||||
showgrid="false"
|
||||
showguides="false"
|
||||
inkscape:zoom="1"
|
||||
inkscape:cx="1.7438941"
|
||||
inkscape:cy="77.729381"
|
||||
inkscape:window-x="1753"
|
||||
inkscape:window-y="38"
|
||||
inkscape:window-maximized="0"
|
||||
inkscape:zoom="11.313708"
|
||||
inkscape:cx="25.239104"
|
||||
inkscape:cy="9.6894688"
|
||||
inkscape:window-x="1600"
|
||||
inkscape:window-y="30"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="svg5644" />
|
||||
<defs
|
||||
id="defs5646">
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
id="linearGradient4188">
|
||||
<stop
|
||||
style="stop-color:#f7f7f7;stop-opacity:1"
|
||||
offset="0"
|
||||
id="stop4190" />
|
||||
<stop
|
||||
style="stop-color:#f2f2f2;stop-opacity:1"
|
||||
offset="1"
|
||||
id="stop4192" />
|
||||
</linearGradient>
|
||||
<radialGradient
|
||||
r="62.769119"
|
||||
fy="193.04066"
|
||||
@@ -230,6 +242,15 @@
|
||||
xlink:href="#linearGradient3820-7-2-8-6"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(0.17524541,0,0,0.05575992,-1.3768094,18.119145)" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient4188"
|
||||
id="linearGradient4194"
|
||||
x1="71.341965"
|
||||
y1="40.114685"
|
||||
x2="71.341965"
|
||||
y2="96.856537"
|
||||
gradientUnits="userSpaceOnUse" />
|
||||
</defs>
|
||||
<metadata
|
||||
id="metadata5649">
|
||||
@@ -239,7 +260,7 @@
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
<dc:title />
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
@@ -353,19 +374,21 @@
|
||||
</g>
|
||||
<g
|
||||
id="g4667"
|
||||
transform="matrix(0.26169823,0,0,0.26169823,-2.5833858,-1.920854)">
|
||||
transform="matrix(0.26169823,0,0,0.26169823,-2.5833858,-1.920854)"
|
||||
style="fill-opacity:1;fill:url(#linearGradient4194)">
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
style="fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:0.34900001;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
style="fill:url(#linearGradient4194);fill-opacity:1;stroke:none;stroke-width:0.34900001;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="m 97.330311,42.284792 a 7.0356347,7.1986844 39.729891 0 0 -3.278971,-1.929288 7.0356347,7.1986844 39.729891 0 0 -6.812034,1.857219 l -0.0015,-0.0015 -6.337307,6.363917 -2.41292,-2.423051 c -1.365731,-1.371466 -3.564848,-1.371466 -4.930579,0 -1.365732,1.371466 -1.365732,3.579818 0,4.951284 l 14.756822,14.818785 c 1.365732,1.371467 3.56485,1.371467 4.930581,0 1.365731,-1.371466 1.365731,-3.579816 0,-4.951282 l -2.41292,-2.423052 6.337307,-6.363916 -0.0034,-0.0034 a 7.0356347,7.1986844 39.729891 0 0 1.851392,-6.838692 7.0356347,7.1986844 39.729891 0 0 -1.686523,-3.057054 z"
|
||||
id="rect8140-3-36" />
|
||||
<g
|
||||
transform="matrix(0.88241267,0,0,0.88241267,14.536297,13.778944)"
|
||||
id="g4284">
|
||||
id="g4284"
|
||||
style="fill-opacity:1;fill:url(#linearGradient4194)">
|
||||
<path
|
||||
id="rect8172-9-2-12"
|
||||
d="m 66.974129,47.701228 -26.992865,27.106208 -0.0077,0.0077 0.0023,0.0023 -7.963775,15.460251 3.818679,3.834713 15.395056,-7.997766 0.0023,0.0023 0.0077,-0.0077 L 78.228591,59.002947 66.974236,47.701336 Z"
|
||||
style="fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:0.34900001;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
style="fill:url(#linearGradient4194);fill-opacity:1;stroke:none;stroke-width:0.34900001;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
inkscape:connector-curvature="0" />
|
||||
</g>
|
||||
</g>
|
||||
|
||||
|
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 18 KiB |
@@ -24,20 +24,32 @@
|
||||
guidetolerance="10"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="1097"
|
||||
inkscape:window-height="961"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:window-height="962"
|
||||
id="namedview52"
|
||||
showgrid="false"
|
||||
showguides="false"
|
||||
inkscape:zoom="1"
|
||||
inkscape:cx="28.408762"
|
||||
inkscape:cy="-46.963333"
|
||||
inkscape:window-x="1665"
|
||||
inkscape:zoom="0.99999996"
|
||||
inkscape:cx="177.80714"
|
||||
inkscape:cy="48.432504"
|
||||
inkscape:window-x="1600"
|
||||
inkscape:window-y="30"
|
||||
inkscape:window-maximized="0"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="svg5644" />
|
||||
<defs
|
||||
id="defs5646">
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
id="linearGradient4187">
|
||||
<stop
|
||||
style="stop-color:#f7f7f7;stop-opacity:1"
|
||||
offset="0"
|
||||
id="stop4189" />
|
||||
<stop
|
||||
style="stop-color:#f2f2f2;stop-opacity:1"
|
||||
offset="1"
|
||||
id="stop4191" />
|
||||
</linearGradient>
|
||||
<radialGradient
|
||||
r="62.769119"
|
||||
fy="193.04066"
|
||||
@@ -212,14 +224,23 @@
|
||||
r="62.769119" />
|
||||
<radialGradient
|
||||
cx="99.157013"
|
||||
cy="178.78207"
|
||||
cy="187.86072"
|
||||
r="62.769119"
|
||||
fx="99.157013"
|
||||
fy="178.78207"
|
||||
fy="187.86072"
|
||||
id="radialGradient3018"
|
||||
xlink:href="#linearGradient3820-7-2-8-6"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(0.27083381,0,0,0.08762273,-2.8550719,25.187228)" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient4187"
|
||||
id="linearGradient4193"
|
||||
x1="71.34787"
|
||||
y1="40.12112"
|
||||
x2="71.34787"
|
||||
y2="96.729141"
|
||||
gradientUnits="userSpaceOnUse" />
|
||||
</defs>
|
||||
<metadata
|
||||
id="metadata5649">
|
||||
@@ -235,12 +256,12 @@
|
||||
</metadata>
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
d="m 41,40.878942 a 17,5.4999999 0 0 1 -33.9999999,0 17,5.4999999 0 1 1 33.9999999,0 z"
|
||||
d="m 41,41.674434 a 17,5.4999999 0 0 1 -33.9999999,0 17,5.4999999 0 1 1 33.9999999,0 z"
|
||||
id="path3818-0-5"
|
||||
style="fill:url(#radialGradient3018);fill-opacity:1;stroke:none" />
|
||||
<g
|
||||
id="g4220"
|
||||
transform="matrix(0.98906656,0,0,0.98906656,0.26238773,-0.20511678)">
|
||||
transform="matrix(0.9961876,0,0,0.9961876,0.09148266,0.35859843)">
|
||||
<path
|
||||
style="fill:#f2ec39;fill-opacity:1;stroke:none;stroke-width:0.34900001;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="M 29.314755,43.762237 A 20.534583,20.62081 0 0 0 43.834902,18.507005 20.534583,20.62081 0 0 0 18.685271,3.9258899 20.534583,20.62081 0 0 0 4.1651283,29.181122 20.534583,20.62081 0 0 0 29.314755,43.762237 Z"
|
||||
@@ -305,17 +326,17 @@
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
id="path8089-1-7-6"
|
||||
d="M 44.30074,23.378251 A 20.300737,20.385981 0 0 1 23.999993,43.764232 20.300737,20.385981 0 0 1 3.6992603,23.378251 20.300737,20.385981 0 0 1 23.999993,2.992265 20.300737,20.385981 0 0 1 44.30074,23.378251 Z"
|
||||
style="opacity:0.4;fill:none;fill-opacity:1;stroke:#000000;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
|
||||
d="M 44.4469,24.111757 A 20.446897,20.532755 0 0 1 23.999994,44.644512 20.446897,20.532755 0 0 1 3.5531,24.111757 20.446897,20.532755 0 0 1 23.999994,3.5790005 20.446897,20.532755 0 0 1 44.4469,24.111757 Z"
|
||||
style="opacity:0.4;fill:none;fill-opacity:1;stroke:#000000;stroke-width:1.00719976;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
id="path8089-1-3-92-1"
|
||||
d="M 43.320557,23.361026 A 19.320554,19.401684 0 0 1 23.999994,42.762711 19.320554,19.401684 0 0 1 4.679443,23.361026 19.320554,19.401684 0 0 1 23.999994,3.959341 19.320554,19.401684 0 0 1 43.320557,23.361026 Z"
|
||||
style="opacity:0.5;fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:0.97393256;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
|
||||
d="M 43.45966,24.094408 A 19.459657,19.541371 0 0 1 23.999994,43.63578 19.459657,19.541371 0 0 1 4.5403399,24.094408 19.459657,19.541371 0 0 1 23.999994,4.5530392 19.459657,19.541371 0 0 1 43.45966,24.094408 Z"
|
||||
style="opacity:0.5;fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:0.98094463;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
|
||||
<g
|
||||
style="opacity:0.05;fill:#000000;fill-opacity:1"
|
||||
id="g8243-2-7-4"
|
||||
transform="matrix(0.10074242,0.10116545,-0.10074242,0.10116545,18.312207,-75.525233)">
|
||||
transform="matrix(0.10146774,0.10189382,-0.10146774,0.10189382,18.271257,-75.503807)">
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.34900001;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
@@ -330,7 +351,7 @@
|
||||
<g
|
||||
style="opacity:0.15;fill:#000000;fill-opacity:1"
|
||||
id="g8243-2-7-5"
|
||||
transform="matrix(0.09809086,0.09850273,-0.09809086,0.09850273,18.461911,-73.72967)">
|
||||
transform="matrix(0.09879708,0.09921193,-0.09879708,0.09921193,18.422039,-73.695316)">
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.34900001;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
@@ -344,19 +365,21 @@
|
||||
</g>
|
||||
<g
|
||||
id="g4667"
|
||||
transform="matrix(0.38291151,0,0,0.38291151,-3.1908309,-2.8431794)">
|
||||
transform="matrix(0.38566838,0,0,0.38566838,-3.3865983,-2.2984577)"
|
||||
style="fill-opacity:1;fill:url(#linearGradient4193)">
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
style="fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:0.34900001;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
style="fill:url(#linearGradient4193);fill-opacity:1;stroke:none;stroke-width:0.34900001;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="m 97.330311,42.284792 a 7.0356347,7.1986844 39.729891 0 0 -3.278971,-1.929288 7.0356347,7.1986844 39.729891 0 0 -6.812034,1.857219 l -0.0015,-0.0015 -6.337307,6.363917 -2.41292,-2.423051 c -1.365731,-1.371466 -3.564848,-1.371466 -4.930579,0 -1.365732,1.371466 -1.365732,3.579818 0,4.951284 l 14.756822,14.818785 c 1.365732,1.371467 3.56485,1.371467 4.930581,0 1.365731,-1.371466 1.365731,-3.579816 0,-4.951282 l -2.41292,-2.423052 6.337307,-6.363916 -0.0034,-0.0034 a 7.0356347,7.1986844 39.729891 0 0 1.851392,-6.838692 7.0356347,7.1986844 39.729891 0 0 -1.686523,-3.057054 z"
|
||||
id="rect8140-3-36" />
|
||||
<g
|
||||
transform="matrix(0.88241267,0,0,0.88241267,14.536297,13.778944)"
|
||||
id="g4284">
|
||||
id="g4284"
|
||||
style="fill-opacity:1;fill:url(#linearGradient4193)">
|
||||
<path
|
||||
id="rect8172-9-2-12"
|
||||
d="m 66.974129,47.701228 -26.992865,27.106208 -0.0077,0.0077 0.0023,0.0023 -7.963775,15.460251 3.818679,3.834713 15.395056,-7.997766 0.0023,0.0023 0.0077,-0.0077 L 78.228591,59.002947 66.974236,47.701336 Z"
|
||||
style="fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:0.34900001;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
style="fill:url(#linearGradient4193);fill-opacity:1;stroke:none;stroke-width:0.34900001;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
inkscape:connector-curvature="0" />
|
||||
</g>
|
||||
</g>
|
||||
|
||||
|
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 18 KiB |
@@ -24,20 +24,32 @@
|
||||
guidetolerance="10"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="1009"
|
||||
inkscape:window-height="961"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:window-height="962"
|
||||
id="namedview52"
|
||||
showgrid="false"
|
||||
showguides="false"
|
||||
inkscape:zoom="8"
|
||||
inkscape:cx="20.541065"
|
||||
inkscape:cy="26.715043"
|
||||
inkscape:window-x="1665"
|
||||
inkscape:zoom="7.38"
|
||||
inkscape:cx="8.5246546"
|
||||
inkscape:cy="29.967076"
|
||||
inkscape:window-x="1600"
|
||||
inkscape:window-y="30"
|
||||
inkscape:window-maximized="0"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="svg5644" />
|
||||
<defs
|
||||
id="defs5646">
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
id="linearGradient4196">
|
||||
<stop
|
||||
style="stop-color:#f7f7f7;stop-opacity:1"
|
||||
offset="0"
|
||||
id="stop4198" />
|
||||
<stop
|
||||
style="stop-color:#f2f2f2;stop-opacity:1"
|
||||
offset="1"
|
||||
id="stop4200" />
|
||||
</linearGradient>
|
||||
<radialGradient
|
||||
r="62.769119"
|
||||
fy="193.04066"
|
||||
@@ -210,6 +222,15 @@
|
||||
fx="99.189415"
|
||||
fy="185.29727"
|
||||
r="62.769119" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient4196"
|
||||
id="linearGradient4202"
|
||||
x1="71.21978"
|
||||
y1="40.17506"
|
||||
x2="71.21978"
|
||||
y2="97.163078"
|
||||
gradientUnits="userSpaceOnUse" />
|
||||
</defs>
|
||||
<metadata
|
||||
id="metadata5649">
|
||||
@@ -239,7 +260,7 @@
|
||||
</g>
|
||||
<g
|
||||
id="g4222"
|
||||
transform="matrix(0.9995432,0,0,0.9995432,0.01460828,0.55421164)">
|
||||
transform="matrix(0.9995432,0,0,0.9995432,0.01460828,0.41871028)">
|
||||
<path
|
||||
style="fill:#f2ec39;fill-opacity:1;stroke:none;stroke-width:0.34900001;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="M 39.616194,60.12505 A 29.426686,29.550249 0 0 0 60.42401,23.933533 29.426686,29.550249 0 0 0 24.38382,3.0383512 29.426686,29.550249 0 0 0 3.5760092,39.229869 29.426686,29.550249 0 0 0 39.616194,60.12505 Z"
|
||||
@@ -304,17 +325,17 @@
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
id="path8089-1-7-6"
|
||||
d="M 61.387763,32.121486 A 29.387758,29.511157 0 0 1 31.999989,61.632642 29.387758,29.511157 0 0 1 2.6122369,32.121486 29.387758,29.511157 0 0 1 31.999989,2.6103278 29.387758,29.511157 0 0 1 61.387763,32.121486 Z"
|
||||
d="M 61.387763,31.985985 A 29.387758,29.511157 0 0 1 31.999989,61.497141 29.387758,29.511157 0 0 1 2.6122369,31.985985 29.387758,29.511157 0 0 1 31.999989,2.4748264 29.387758,29.511157 0 0 1 61.387763,31.985985 Z"
|
||||
style="opacity:0.4;fill:none;fill-opacity:1;stroke:#000000;stroke-width:1.01068568;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
id="path8089-1-3-92-1"
|
||||
d="M 60.408749,32.121486 A 28.408746,28.528035 0 0 1 31.999992,60.64952 28.408746,28.528035 0 0 1 3.5912509,32.121486 28.408746,28.528035 0 0 1 31.999992,3.5934491 28.408746,28.528035 0 0 1 60.408749,32.121486 Z"
|
||||
d="M 60.408749,31.985985 A 28.408746,28.528035 0 0 1 31.999992,60.514019 28.408746,28.528035 0 0 1 3.5912509,31.985985 28.408746,28.528035 0 0 1 31.999992,3.4579477 28.408746,28.528035 0 0 1 60.408749,31.985985 Z"
|
||||
style="opacity:0.5;fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:0.99692827;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
|
||||
<g
|
||||
style="opacity:0.05;fill:#000000;fill-opacity:1"
|
||||
id="g8243-2-7-4"
|
||||
transform="matrix(0.14325492,0.14385644,-0.14325492,0.14385644,23.912004,-108.85636)">
|
||||
transform="matrix(0.14325492,0.14385644,-0.14325492,0.14385644,23.912004,-108.99186)">
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.34900001;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
@@ -329,7 +350,7 @@
|
||||
<g
|
||||
style="opacity:0.15;fill:#000000;fill-opacity:1"
|
||||
id="g8243-2-7-5"
|
||||
transform="matrix(0.13948439,0.1400701,-0.13948439,0.1400701,24.124884,-105.96951)">
|
||||
transform="matrix(0.13948439,0.1400701,-0.13948439,0.1400701,24.124884,-106.10501)">
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.34900001;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
@@ -343,19 +364,21 @@
|
||||
</g>
|
||||
<g
|
||||
id="g4667"
|
||||
transform="matrix(0.54449711,0,0,0.54449711,-6.6651445,-5.1651764)">
|
||||
transform="matrix(0.54449711,0,0,0.54449711,-6.6651445,-5.3006778)"
|
||||
style="fill-opacity:1;fill:url(#linearGradient4202)">
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
style="fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:0.34900001;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
style="fill:url(#linearGradient4202);fill-opacity:1;stroke:none;stroke-width:0.34900001;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="m 97.330311,42.284792 a 7.0356347,7.1986844 39.729891 0 0 -3.278971,-1.929288 7.0356347,7.1986844 39.729891 0 0 -6.812034,1.857219 l -0.0015,-0.0015 -6.337307,6.363917 -2.41292,-2.423051 c -1.365731,-1.371466 -3.564848,-1.371466 -4.930579,0 -1.365732,1.371466 -1.365732,3.579818 0,4.951284 l 14.756822,14.818785 c 1.365732,1.371467 3.56485,1.371467 4.930581,0 1.365731,-1.371466 1.365731,-3.579816 0,-4.951282 l -2.41292,-2.423052 6.337307,-6.363916 -0.0034,-0.0034 a 7.0356347,7.1986844 39.729891 0 0 1.851392,-6.838692 7.0356347,7.1986844 39.729891 0 0 -1.686523,-3.057054 z"
|
||||
id="rect8140-3-36" />
|
||||
<g
|
||||
transform="matrix(0.88241267,0,0,0.88241267,14.536297,13.778944)"
|
||||
id="g4284">
|
||||
id="g4284"
|
||||
style="fill-opacity:1;fill:url(#linearGradient4202)">
|
||||
<path
|
||||
id="rect8172-9-2-12"
|
||||
d="m 66.974129,47.701228 -26.992865,27.106208 -0.0077,0.0077 0.0023,0.0023 -7.963775,15.460251 3.818679,3.834713 15.395056,-7.997766 0.0023,0.0023 0.0077,-0.0077 L 78.228591,59.002947 66.974236,47.701336 Z"
|
||||
style="fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:0.34900001;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
style="fill:url(#linearGradient4202);fill-opacity:1;stroke:none;stroke-width:0.34900001;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
inkscape:connector-curvature="0" />
|
||||
</g>
|
||||
</g>
|
||||
|
||||
|
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 18 KiB |
@@ -7,6 +7,11 @@ foreach i : icon_sizes
|
||||
)
|
||||
endforeach
|
||||
|
||||
install_data(
|
||||
meson.project_name() + '.gschema.xml',
|
||||
install_dir: join_paths(get_option('datadir'), 'glib-2.0', 'schemas')
|
||||
)
|
||||
|
||||
install_data(
|
||||
meson.project_name() + '.desktop',
|
||||
install_dir: join_paths(get_option('datadir'), 'applications')
|
||||
|
||||
|
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 25 KiB |
|
After Width: | Height: | Size: 26 KiB |
@@ -1,13 +1,67 @@
|
||||
com.github.ronnydo.colorpicker (1.0.1) xenial; urgency=medium
|
||||
|
||||
* Implement "Don't add the same color to color history twice" (issue #24)
|
||||
|
||||
-- Ronny Dobra <ronnydobra at arcor dot de> Thu, 20 Aug 2017 13:30:00 +0100
|
||||
|
||||
com.github.ronnydo.colorpicker (1.0.1) xenial; urgency=medium
|
||||
|
||||
* Improvements to avoid issue #19
|
||||
|
||||
-- Ronny Dobra <ronnydobra at arcor dot de> Thu, 13 Jul 2017 01:45:00 +0100
|
||||
|
||||
com.github.ronnydo.colorpicker (1.0.0) xenial; urgency=medium
|
||||
|
||||
* Main Release!
|
||||
* Implement magnifier (issue #12)
|
||||
* Use your mousewheel to zoom the magnifier in and out.
|
||||
* Invalid AppData file (issue #17)
|
||||
* Code cleanup
|
||||
|
||||
-- Ronny Dobra <ronnydobra at arcor dot de> Thu, 07 Jul 2017 12:00:00 +0100
|
||||
|
||||
com.github.ronnydo.colorpicker (0.9.5) xenial; urgency=medium
|
||||
|
||||
* Fix issue #13
|
||||
|
||||
-- Ronny Dobra <ronnydobra at arcor dot de> Thu, 27 Jun 2017 23:20:00 +0100
|
||||
|
||||
com.github.ronnydo.colorpicker (0.9.4) xenial; urgency=medium
|
||||
|
||||
* Fix issue #16
|
||||
|
||||
-- Ronny Dobra <ronnydobra at arcor dot de> Thu, 26 Jun 2017 23:10:00 +0100
|
||||
|
||||
com.github.ronnydo.colorpicker (0.9.3) xenial; urgency=medium
|
||||
|
||||
* Color Picker now restores your recent window position, color format and color history! (issue #10, issue #11 and issue #15)
|
||||
* Minor icon changes
|
||||
|
||||
-- Ronny Dobra <ronnydobra at arcor dot de> Thu, 26 Jun 2017 22:45:00 +0100
|
||||
|
||||
com.github.ronnydo.colorpicker (0.9.2) xenial; urgency=medium
|
||||
|
||||
* Fix issue #9
|
||||
|
||||
-- Ronny Dobra <ronnydobra at arcor dot de> Thu, 23 Jun 2017 17:15:00 +0100
|
||||
|
||||
com.github.ronnydo.colorpicker (0.9.1) xenial; urgency=medium
|
||||
|
||||
* Fix issue #8
|
||||
|
||||
-- Ronny Dobra <ronnydobra at arcor dot de> Thu, 23 Jun 2017 09:45:00 +0100
|
||||
|
||||
com.github.ronnydo.colorpicker (0.9.0) xenial; urgency=medium
|
||||
|
||||
* Beta release
|
||||
* Fixing issue #4
|
||||
* Fixing issue #5
|
||||
* Fixing issue #6
|
||||
* Fixing issue #7
|
||||
* Fix issue #4
|
||||
* Fix issue #5
|
||||
* Fix issue #6
|
||||
* Fix issue #7
|
||||
* Update icons
|
||||
* Add German translation
|
||||
|
||||
-- Ronny Dobra <ronnydobra at arcor dot de> Thu, 21 Jun 2017 19:22:00 +0100
|
||||
-- Ronny Dobra <ronnydobra at arcor dot de> Thu, 22 Jun 2017 23:02:00 +0100
|
||||
|
||||
com.github.ronnydo.colorpicker (0.1.2) xenial; urgency=low
|
||||
|
||||
|
||||
@@ -2,10 +2,10 @@ Source: com.github.ronnydo.colorpicker
|
||||
Section: x11
|
||||
Priority: extra
|
||||
Maintainer: Ronny Dobra <ronnydobra at arcor dot de>
|
||||
Build-Depends: cmake (>= 2.8),
|
||||
debhelper (>= 9),
|
||||
Build-Depends: debhelper (>= 9),
|
||||
libgranite-dev,
|
||||
libgtk-3-dev,
|
||||
meson
|
||||
valac
|
||||
|
||||
Standards-Version: 3.9.3
|
||||
@@ -13,4 +13,4 @@ Package: com.github.ronnydo.colorpicker
|
||||
Architecture: any
|
||||
Depends: ${misc:Depends}, ${shlibs:Depends}
|
||||
Description: An intuitive Color Picker
|
||||
The most intuitive Color Picker to speed up your workflow.
|
||||
The most intuitive Color Picker to speed up your workflow
|
||||
@@ -10,5 +10,20 @@
|
||||
#export DH_VERBOSE=1
|
||||
|
||||
%:
|
||||
dh $@
|
||||
dh $@
|
||||
|
||||
override_dh_auto_clean:
|
||||
rm -rf debian/build
|
||||
|
||||
override_dh_auto_configure:
|
||||
mkdir -p debian/build
|
||||
cd debian/build && meson --prefix=/usr ../..
|
||||
|
||||
override_dh_auto_build:
|
||||
cd debian/build && ninja -v
|
||||
|
||||
override_dh_auto_test:
|
||||
cd debian/build && ninja test
|
||||
|
||||
override_dh_auto_install:
|
||||
cd debian/build && DESTDIR=${CURDIR}/debian/com.github.ronnydo.colorpicker ninja install
|
||||
@@ -0,0 +1,7 @@
|
||||
sudo rm -r build
|
||||
meson build
|
||||
cd build
|
||||
mesonconf -Dprefix=/usr
|
||||
ninja
|
||||
./com.github.ronnydo.colorpicker
|
||||
cd ..
|
||||
@@ -23,16 +23,19 @@ executable(
|
||||
'src/ExtRGBA.vala',
|
||||
'src/Widgets/ColorArea.vala',
|
||||
'src/Widgets/ColorHistory.vala',
|
||||
'src/Widgets/MousePosition.vala',
|
||||
'src/Widgets/Picker.vala',
|
||||
'src/Services/Settings.vala',
|
||||
c_args: c_args,
|
||||
dependencies: [
|
||||
dependency('glib-2.0'),
|
||||
dependency('gobject-2.0'),
|
||||
dependency('granite'),
|
||||
dependency('gtk+-3.0'),
|
||||
],
|
||||
install : true
|
||||
)
|
||||
|
||||
#meson.add_install_script('meson/post_install.py')
|
||||
meson.add_install_script('meson/post_install.py')
|
||||
|
||||
subdir('data')
|
||||
subdir('po')
|
||||
@@ -0,0 +1,10 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import os
|
||||
import subprocess
|
||||
|
||||
schemadir = os.path.join(os.environ['MESON_INSTALL_PREFIX'], 'share', 'glib-2.0', 'schemas')
|
||||
|
||||
if not os.environ.get('DESTDIR'):
|
||||
print('Compiling gsettings schemas...')
|
||||
subprocess.call(['glib-compile-schemas', schemadir])
|
||||
@@ -11,7 +11,7 @@
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public
|
||||
* You should have received a copy of the GNU General Public
|
||||
* License along with this program; if not, write to the
|
||||
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
* Boston, MA 02110-1301 USA
|
||||
@@ -20,9 +20,13 @@
|
||||
*/
|
||||
|
||||
namespace ColorPicker {
|
||||
|
||||
// namespace-wide variable
|
||||
public ColorPicker.Services.Settings settings;
|
||||
|
||||
public class ColorPickerApp : Granite.Application {
|
||||
|
||||
|
||||
public ColorPickerApp () {
|
||||
Object (application_id: "com.github.ronnydo.colorpicker",
|
||||
flags: ApplicationFlags.FLAGS_NONE);
|
||||
@@ -34,8 +38,10 @@ namespace ColorPicker {
|
||||
return;
|
||||
}
|
||||
|
||||
settings = ColorPicker.Services.Settings.get_instance ();
|
||||
|
||||
var app_window = new ColorPickerWindow (this);
|
||||
|
||||
|
||||
app_window.show_all ();
|
||||
|
||||
var quit_action = new SimpleAction ("quit", null);
|
||||
|
||||
@@ -22,24 +22,23 @@
|
||||
namespace ColorPicker {
|
||||
|
||||
public class ColorPickerWindow: Gtk.Dialog {
|
||||
|
||||
|
||||
ExtRGBA ext_active_color = ExtRGBA ();
|
||||
|
||||
|
||||
public ColorPickerWindow (Gtk.Application application) {
|
||||
Object (application: application,
|
||||
icon_name: "com.github.ronnydo.colorpicker",
|
||||
title: _("Color Picker"),
|
||||
resizable: false,
|
||||
//height_request: 500,
|
||||
width_request: 500
|
||||
);
|
||||
);
|
||||
}
|
||||
|
||||
construct {
|
||||
// main box
|
||||
// main box
|
||||
ext_active_color.parse ("#FFFFFF");
|
||||
|
||||
var color_area = new ColorArea ();
|
||||
|
||||
var color_area = new ColorPicker.Widgets.ColorArea ();
|
||||
color_area.set_color (ext_active_color);
|
||||
|
||||
var hex_label = new Gtk.Label (ext_active_color.to_uppercase_hex_string ());
|
||||
@@ -48,8 +47,7 @@ namespace ColorPicker {
|
||||
hex_label.set_selectable (true);
|
||||
hex_label.set_use_markup (true);
|
||||
|
||||
hex_label.get_style_context ().add_class ("h1");
|
||||
|
||||
hex_label.get_style_context ().add_class ("h1");
|
||||
|
||||
var pick_color_button = new Gtk.Button.with_label (_("Pick Color"));
|
||||
pick_color_button.get_style_context ().add_class (Gtk.STYLE_CLASS_SUGGESTED_ACTION);
|
||||
@@ -87,7 +85,7 @@ namespace ColorPicker {
|
||||
color_format_combobox.append_text ("rgba");
|
||||
color_format_combobox.append_text ("Gdk RGBA");
|
||||
color_format_combobox.append_text ("Qt rgba");
|
||||
color_format_combobox.active = 2;
|
||||
color_format_combobox.active = settings.color_format_index;
|
||||
|
||||
var adjust_button = new Gtk.Button.from_icon_name ("media-eq-symbolic");
|
||||
adjust_button.margin_start = 12;
|
||||
@@ -108,7 +106,7 @@ namespace ColorPicker {
|
||||
color_history_label.get_style_context ().add_class ("h4");
|
||||
color_history_label.halign = Gtk.Align.START;
|
||||
|
||||
var color_history = new ColorHistory ();
|
||||
var color_history = new ColorPicker.Widgets.ColorHistory ();
|
||||
|
||||
var color_history_box = new Gtk.Box (Gtk.Orientation.VERTICAL, 0);
|
||||
color_history_box.margin_top = 6;
|
||||
@@ -123,13 +121,38 @@ namespace ColorPicker {
|
||||
skeleton_box.margin_bottom = 0;
|
||||
skeleton_box.pack_start (main_box);
|
||||
skeleton_box.pack_start (format_box);
|
||||
|
||||
|
||||
var content_box = get_content_area () as Gtk.Box;
|
||||
content_box.pack_start (skeleton_box);
|
||||
|
||||
content_box.pack_start (skeleton_box);
|
||||
|
||||
|
||||
// restore old state
|
||||
var color_list = color_history.get_color_list ();
|
||||
if (color_list != null && color_list.size >= 1) {
|
||||
ext_active_color = (ExtRGBA) color_list.last ();
|
||||
|
||||
hex_label.set_markup (ext_active_color.to_uppercase_hex_string ());
|
||||
color_area.set_color (ext_active_color);
|
||||
color_area.queue_draw ();
|
||||
int id = color_format_combobox.get_active ();
|
||||
update_color_format_combobox_text (format_entry, id);
|
||||
|
||||
if (color_list.size >= 2) {
|
||||
skeleton_box.pack_start (color_history_box);
|
||||
color_history_box.show_all ();
|
||||
}
|
||||
}
|
||||
|
||||
var window_x = settings.window_x;
|
||||
var window_y = settings.window_y;
|
||||
|
||||
if (window_x != -1 || window_y != -1) {
|
||||
move (window_x, window_y);
|
||||
}
|
||||
|
||||
// activate color picker
|
||||
pick_color_button.clicked.connect (() => {
|
||||
var mouse_position = new ColorPicker.Widgets.MousePosition ();
|
||||
var mouse_position = new ColorPicker.Widgets.Picker ();
|
||||
mouse_position.show_all ();
|
||||
|
||||
mouse_position.moved.connect ((t, color) => {
|
||||
@@ -142,6 +165,7 @@ namespace ColorPicker {
|
||||
mouse_position.cancelled.connect (() => {
|
||||
color_area.set_color (ext_active_color);
|
||||
color_area.queue_draw ();
|
||||
hex_label.set_markup (ext_active_color.to_uppercase_hex_string ());
|
||||
mouse_position.close ();
|
||||
this.present ();
|
||||
});
|
||||
@@ -158,10 +182,10 @@ namespace ColorPicker {
|
||||
|
||||
color_history.add_color (ext_active_color);
|
||||
|
||||
var color_list = color_history.get_color_list ();
|
||||
var c_list = color_history.get_color_list ();
|
||||
|
||||
if (color_history_box.get_parent () == null) {
|
||||
if (color_list != null && color_list.size > 1) {
|
||||
if (c_list != null && c_list.size >= 2) {
|
||||
skeleton_box.pack_start (color_history_box);
|
||||
color_history_box.show_all ();
|
||||
}
|
||||
@@ -180,10 +204,15 @@ namespace ColorPicker {
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
//color_format_combobox.changed.connect (color_format_changed);
|
||||
|
||||
color_format_combobox.changed.connect (() => {
|
||||
int id = color_format_combobox.get_active ();
|
||||
update_color_format_combobox_text (format_entry, id);
|
||||
ColorPicker.settings.color_format_index = id;
|
||||
});
|
||||
|
||||
|
||||
// handle changed color in color history
|
||||
color_history.color_clicked.connect ((t, color) => {
|
||||
@@ -198,9 +227,14 @@ namespace ColorPicker {
|
||||
|
||||
this.present ();
|
||||
});
|
||||
|
||||
|
||||
|
||||
// trigger picker on startup
|
||||
pick_color_button.clicked ();
|
||||
this.show.connect(() => {
|
||||
pick_color_button.clicked ();
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
private void update_color_format_combobox_text (Gtk.Entry format_entry, int id) {
|
||||
@@ -226,6 +260,17 @@ namespace ColorPicker {
|
||||
}
|
||||
}
|
||||
|
||||
public override bool delete_event (Gdk.EventAny event) {
|
||||
// save window position
|
||||
int root_x, root_y;
|
||||
get_position (out root_x, out root_y);
|
||||
|
||||
settings.window_x = root_x;
|
||||
settings.window_y = root_y;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,47 @@
|
||||
/*
|
||||
* Copyright (c) 2017 Ronny Dobra (https://github.com/RonnyDo/ColorPicker)
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public
|
||||
* License along with this program; if not, write to the
|
||||
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
* Boston, MA 02110-1301 USA
|
||||
*
|
||||
* Authored by: Ronny Dobra <ronnydobra at arcor dot de>
|
||||
*/
|
||||
|
||||
namespace ColorPicker.Services {
|
||||
|
||||
public class Settings : Granite.Services.Settings {
|
||||
|
||||
private static Settings? instance = null;
|
||||
|
||||
public int window_x { get; set; }
|
||||
public int window_y { get; set; }
|
||||
public int color_format_index { get; set; }
|
||||
public string[] color_history { get; set; }
|
||||
public int zoomlevel { get; set; }
|
||||
|
||||
public static Settings get_instance () {
|
||||
if (instance == null) {
|
||||
instance = new Settings ();
|
||||
}
|
||||
|
||||
return instance;
|
||||
}
|
||||
|
||||
private Settings () {
|
||||
base ("com.github.ronnydo.colorpicker");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
* Authored by: Ronny Dobra <ronnydobra at arcor dot de>
|
||||
*/
|
||||
|
||||
namespace ColorPicker {
|
||||
namespace ColorPicker.Widgets {
|
||||
|
||||
public class ColorArea: Gtk.DrawingArea {
|
||||
|
||||
|
||||
@@ -18,7 +18,8 @@
|
||||
*
|
||||
* Authored by: Ronny Dobra <ronnydobra at arcor dot de>
|
||||
*/
|
||||
namespace ColorPicker {
|
||||
|
||||
namespace ColorPicker.Widgets {
|
||||
|
||||
public class ColorHistory: Gtk.DrawingArea {
|
||||
|
||||
@@ -28,12 +29,11 @@ namespace ColorPicker {
|
||||
Gee.ArrayList<Gdk.RGBA?> color_list;
|
||||
|
||||
const int border_width = 1;
|
||||
const string border_color_string = "rgba(50, 50, 50, 0.4)";
|
||||
|
||||
// hardcoded from /usr/share/themes/elementary/gtk-3.0/[gtk.css|gtk-dark.css]
|
||||
const string border_color_string = "rgba(0, 0, 0, 0.25)";
|
||||
private Gdk.RGBA border_color = Gdk.RGBA();
|
||||
|
||||
const string triangle_color_string = "#F5F5F5";
|
||||
private Gdk.RGBA triangle_color = Gdk.RGBA();
|
||||
|
||||
|
||||
const int shadow_width = 16;
|
||||
const string shadow_color_string = "#000000";
|
||||
//const string shadow_color_string = "#A9A9A9";
|
||||
@@ -42,42 +42,89 @@ namespace ColorPicker {
|
||||
int selected_color = 0;
|
||||
|
||||
|
||||
public ColorHistory () {
|
||||
public ColorHistory () {
|
||||
set_size_request (100, 28);
|
||||
add_events(Gdk.EventMask.BUTTON_PRESS_MASK | Gdk.EventMask.BUTTON_RELEASE_MASK | Gdk.EventMask.ENTER_NOTIFY_MASK);
|
||||
color_list = new Gee.ArrayList<Gdk.RGBA?> ();
|
||||
restore_colors ();
|
||||
border_color.parse (border_color_string);
|
||||
triangle_color.parse (triangle_color_string);
|
||||
}
|
||||
|
||||
construct {
|
||||
//get_window ().set_cursor (new Gdk.Cursor (Gdk.CursorType.HAND2));
|
||||
get_window ().set_cursor (new Gdk.Cursor.for_display (Gdk.Display.get_default (), Gdk.CursorType.HAND2));
|
||||
get_window ().set_cursor (new Gdk.Cursor.for_display (Gdk.Display.get_default (), Gdk.CursorType.HAND2));
|
||||
}
|
||||
|
||||
private void restore_colors () {
|
||||
var color_array = settings.color_history;
|
||||
|
||||
if (color_array != null) {
|
||||
// drop oldest colors, if more colors are stored as allowed
|
||||
if (max_colors < color_array.length) {
|
||||
int offset = color_array.length - max_colors;
|
||||
var sliced_array = color_array [offset:color_array.length];
|
||||
color_array = sliced_array;
|
||||
}
|
||||
|
||||
foreach (var color_value in color_array) {
|
||||
Gdk.RGBA color = Gdk.RGBA();
|
||||
color.parse(color_value);
|
||||
color_list.add (color);
|
||||
}
|
||||
|
||||
selected_color = color_list.size - 1;
|
||||
}
|
||||
}
|
||||
|
||||
private void store_colors () {
|
||||
var c_list = get_color_list ();
|
||||
string[] c_array = new string[c_list.size + 1];
|
||||
|
||||
for (int i = 0; i < c_list.size; i++) {
|
||||
c_array[i] = c_list.get (i).to_string ();
|
||||
}
|
||||
|
||||
settings.color_history = c_array;
|
||||
}
|
||||
|
||||
public void add_color (Gdk.RGBA color) {
|
||||
if (color_list.size == max_colors) {
|
||||
remove_oldest_color ();
|
||||
}
|
||||
int c_index = get_index_of (color);
|
||||
|
||||
if (c_index < 0) {
|
||||
if (color_list.size >= max_colors) {
|
||||
color_list.remove_at (0);
|
||||
}
|
||||
} else {
|
||||
color_list.remove_at (c_index);
|
||||
}
|
||||
|
||||
color_list.add (color);
|
||||
selected_color = get_color_list ().size - 1;
|
||||
store_colors ();
|
||||
selected_color = get_color_list ().size - 1;
|
||||
}
|
||||
|
||||
public void remove_oldest_color () {
|
||||
color_list.remove_at (0);
|
||||
}
|
||||
public int get_index_of (Gdk.RGBA color) {
|
||||
for (int i = 0; i < color_list.size; i++) {
|
||||
if (color_list[i] == color) {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
public Gee.ArrayList<Gdk.RGBA?> get_color_list () {
|
||||
return color_list;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/* Widget is asked to draw itself */
|
||||
public override bool draw (Cairo.Context ctx) {
|
||||
|
||||
|
||||
int width = get_allocated_width (); // better element_width / amount
|
||||
if (color_list == null && color_list.size <= 0) {
|
||||
return true;
|
||||
}
|
||||
|
||||
int width = get_allocated_width ();
|
||||
int height = get_allocated_height ();
|
||||
|
||||
var style_context = get_toplevel ().get_style_context ();
|
||||
|
||||
// colorboxes
|
||||
for (int i = 0; i < color_list.size; i++) {
|
||||
@@ -89,11 +136,10 @@ namespace ColorPicker {
|
||||
ctx.rel_line_to (-1 * width / color_list.size - 1, 0);
|
||||
ctx.close_path ();
|
||||
|
||||
Gdk.cairo_set_source_rgba (ctx, color_list.get(i));
|
||||
Gdk.cairo_set_source_rgba (ctx, color_list.get (i));
|
||||
|
||||
ctx.fill ();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// simple shade
|
||||
ctx.new_path ();
|
||||
@@ -105,8 +151,7 @@ namespace ColorPicker {
|
||||
Gdk.cairo_set_source_rgba (ctx, s);
|
||||
|
||||
ctx.set_line_width (border_width);
|
||||
ctx.stroke ();
|
||||
|
||||
ctx.stroke ();
|
||||
|
||||
/*
|
||||
// real faded shade
|
||||
@@ -124,53 +169,40 @@ namespace ColorPicker {
|
||||
Gdk.cairo_set_source_rgba (ctx, shadow_color);
|
||||
ctx.stroke ();
|
||||
}
|
||||
*/
|
||||
|
||||
// colorboxes border
|
||||
*/
|
||||
|
||||
// triangle fill
|
||||
ctx.new_path ();
|
||||
ctx.move_to (0, 0);
|
||||
ctx.rel_line_to (width, 0);
|
||||
ctx.rel_line_to (0, height);
|
||||
ctx.rel_line_to (-1 * width, 0);
|
||||
ctx.close_path ();
|
||||
|
||||
Gdk.cairo_set_source_rgba (ctx, border_color);
|
||||
// fix: stright lines must be + 1 to appear same as diagonales
|
||||
ctx.set_line_width (border_width + 1);
|
||||
|
||||
int triangle_height = 10;
|
||||
int triangle_width = 20;
|
||||
// fix: "+1" against rounding error
|
||||
ctx.move_to ((width / color_list.size * selected_color + 1) + (width / color_list.size / 2 + 1) - triangle_width / 2, height);
|
||||
ctx.rel_line_to (triangle_width / 2, -1 * triangle_height);
|
||||
ctx.rel_line_to (triangle_width / 2, triangle_height);
|
||||
ctx.close_path ();
|
||||
Gdk.cairo_set_source_rgba (ctx, style_context.get_background_color(Gtk.StateFlags.NORMAL));
|
||||
ctx.fill ();
|
||||
|
||||
|
||||
// triangle border (left tip -> tip -> right tip)
|
||||
ctx.new_path ();
|
||||
Gdk.cairo_set_source_rgba (ctx, border_color);
|
||||
ctx.set_line_width (border_width);
|
||||
ctx.move_to ((width / color_list.size * selected_color + 1) + (width / color_list.size / 2 + 1) - triangle_width / 2, height);
|
||||
ctx.rel_line_to (triangle_width / 2, -1 * triangle_height);
|
||||
ctx.rel_line_to (triangle_width / 2, triangle_height);
|
||||
ctx.stroke ();
|
||||
|
||||
|
||||
|
||||
// triangle (Is used to indicate the selected color, which isn't implemented yet)
|
||||
if (color_list.size > 0) {
|
||||
ctx.new_path ();
|
||||
int triangle_height = 10;
|
||||
int triangle_width = 20;
|
||||
|
||||
// fix: "+1" against rounding error
|
||||
ctx.move_to ((width / color_list.size * selected_color + 1) + (width / color_list.size / 2 + 1), height - triangle_height);
|
||||
ctx.rel_line_to (triangle_width / 2, triangle_height);
|
||||
ctx.rel_line_to (-1 * triangle_width, 0);
|
||||
ctx.close_path ();
|
||||
|
||||
Gdk.cairo_set_source_rgba (ctx, triangle_color);
|
||||
|
||||
ctx.fill ();
|
||||
|
||||
// triangle border
|
||||
ctx.new_path ();
|
||||
// fix: "+1" against rounding error
|
||||
ctx.move_to ((width / color_list.size * selected_color + 1) + (width / color_list.size / 2 + 1) - triangle_width / 2, height);
|
||||
ctx.rel_line_to (triangle_width / 2, -1 * triangle_height);
|
||||
ctx.rel_line_to (triangle_width / 2, triangle_height);
|
||||
Gdk.cairo_set_source_rgba (ctx, border_color);
|
||||
|
||||
ctx.set_line_width (border_width);
|
||||
|
||||
ctx.stroke ();
|
||||
}
|
||||
|
||||
// continue from right triangle tip to draw around the ColorHistory border
|
||||
ctx.set_line_width (border_width +1);
|
||||
ctx.move_to ((width / color_list.size * selected_color + 1) + (width / color_list.size / 2 + 1) + triangle_width / 2, height);
|
||||
ctx.line_to (width, height);
|
||||
ctx.line_to (width, 0);
|
||||
ctx.line_to (0, 0);
|
||||
ctx.line_to (0, height);
|
||||
ctx.line_to ((width / color_list.size * selected_color + 1) + (width / color_list.size / 2 + 1) - triangle_width / 2, height);
|
||||
ctx.stroke ();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -184,8 +216,6 @@ namespace ColorPicker {
|
||||
|
||||
|
||||
public override bool button_release_event (Gdk.EventButton e) {
|
||||
|
||||
stdout.printf("clicked");
|
||||
if (e.button != 1) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1,162 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2017 Ronny Dobra (https://github.com/RonnyDo/ColorPicker)
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public
|
||||
* License along with this program; if not, write to the
|
||||
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
* Boston, MA 02110-1301 USA
|
||||
*
|
||||
* Authored by: Ronny Dobra <ronnydobra at arcor dot de>
|
||||
*/
|
||||
|
||||
namespace ColorPicker.Widgets {
|
||||
|
||||
public class MousePosition : Granite.Widgets.CompositedWindow {
|
||||
public signal void picked (Gdk.RGBA color);
|
||||
public signal void cancelled ();
|
||||
public signal void moved (Gdk.RGBA color);
|
||||
|
||||
construct {
|
||||
type = Gtk.WindowType.POPUP;
|
||||
}
|
||||
|
||||
public MousePosition () {
|
||||
stick ();
|
||||
set_resizable (true);
|
||||
set_deletable (false);
|
||||
set_skip_taskbar_hint (true);
|
||||
set_skip_pager_hint (true);
|
||||
set_keep_above (true);
|
||||
|
||||
var screen = get_screen ();
|
||||
set_default_size (screen.get_width (), screen.get_height ());
|
||||
}
|
||||
|
||||
|
||||
public override bool button_release_event (Gdk.EventButton e) {
|
||||
if (e.button != 1) {
|
||||
return true;
|
||||
}
|
||||
|
||||
Gdk.RGBA color = get_color_at ((int) e.x_root, (int) e.y_root);
|
||||
picked (color);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
public override bool motion_notify_event (Gdk.EventMotion e) {
|
||||
Gdk.RGBA color = get_color_at ((int) e.x_root, (int) e.y_root);
|
||||
moved (color);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
public override bool key_press_event (Gdk.EventKey e) {
|
||||
if (e.keyval == Gdk.Key.Escape) {
|
||||
cancelled ();
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public Gdk.RGBA get_color_at (int x, int y) {
|
||||
Gdk.Window win = Gdk.get_default_root_window ();
|
||||
Gdk.Pixbuf? pixbuf = Gdk.pixbuf_get_from_window (win, x, y, 1, 1);
|
||||
|
||||
if (pixbuf != null) {
|
||||
// see https://hackage.haskell.org/package/gtk3-0.14.6/docs/Graphics-UI-Gtk-Gdk-Pixbuf.html
|
||||
uint8 red = pixbuf.get_pixels()[0];
|
||||
uint8 green = pixbuf.get_pixels()[1];
|
||||
uint8 blue = pixbuf.get_pixels()[2];
|
||||
|
||||
Gdk.RGBA color = Gdk.RGBA();
|
||||
string spec = "rgb(" + red.to_string() + "," + green.to_string() + "," + blue.to_string() + ")";
|
||||
if (color.parse (spec)) {
|
||||
return color;
|
||||
} else {
|
||||
stdout.printf("ERROR: Parse pixel rgb values failed.");
|
||||
}
|
||||
}
|
||||
|
||||
// fallback: default RGBA color
|
||||
stdout.printf("ERROR: Gdk.pixbuf_get_from_window failed");
|
||||
return Gdk.RGBA ();
|
||||
}
|
||||
|
||||
|
||||
public override void show_all () {
|
||||
base.show_all ();
|
||||
var manager = Gdk.Display.get_default ().get_device_manager ();
|
||||
var pointer = manager.get_client_pointer ();
|
||||
var keyboard = pointer.get_associated_device ();
|
||||
var window = get_window ();
|
||||
|
||||
var status = pointer.grab (window,
|
||||
Gdk.GrabOwnership.NONE,
|
||||
false,
|
||||
Gdk.EventMask.BUTTON_PRESS_MASK | Gdk.EventMask.BUTTON_RELEASE_MASK | Gdk.EventMask.POINTER_MOTION_MASK,
|
||||
new Gdk.Cursor.for_display (window.get_display (), Gdk.CursorType.CROSSHAIR),
|
||||
Gtk.get_current_event_time ());
|
||||
|
||||
if (status != Gdk.GrabStatus.SUCCESS) {
|
||||
pointer.ungrab (Gtk.get_current_event_time ());
|
||||
}
|
||||
|
||||
if (keyboard != null) {
|
||||
status = keyboard.grab (window,
|
||||
Gdk.GrabOwnership.NONE,
|
||||
false,
|
||||
Gdk.EventMask.KEY_PRESS_MASK,
|
||||
null,
|
||||
Gtk.get_current_event_time ());
|
||||
|
||||
if (status != Gdk.GrabStatus.SUCCESS) {
|
||||
keyboard.ungrab (Gtk.get_current_event_time ());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public new void close () {
|
||||
get_window ().set_cursor (null);
|
||||
base.close ();
|
||||
}
|
||||
|
||||
/*
|
||||
public override bool draw (Cairo.Context ctx) {
|
||||
if (!dragging) {
|
||||
return true;
|
||||
}
|
||||
|
||||
int w = get_allocated_width ();
|
||||
int h = get_allocated_height ();
|
||||
|
||||
ctx.rectangle (0, 0, w, h);
|
||||
ctx.set_source_rgba (0.1, 0.1, 0.1, 0.2);
|
||||
ctx.fill ();
|
||||
|
||||
ctx.rectangle (0, 0, w, h);
|
||||
ctx.set_source_rgb (0.7, 0.7, 0.7);
|
||||
ctx.set_line_width (1.0);
|
||||
ctx.stroke ();
|
||||
|
||||
return base.draw (ctx);
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,318 @@
|
||||
/*
|
||||
* Copyright (c) 2017 Ronny Dobra (https://github.com/RonnyDo/ColorPicker)
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public
|
||||
* License along with this program; if not, write to the
|
||||
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
* Boston, MA 02110-1301 USA
|
||||
*
|
||||
* Authored by: Ronny Dobra <ronnydobra at arcor dot de>
|
||||
* Inspired by: https://github.com/stuartlangridge/ColourPicker/
|
||||
*/
|
||||
|
||||
namespace ColorPicker.Widgets {
|
||||
|
||||
public class Picker : Granite.Widgets.CompositedWindow {
|
||||
|
||||
public signal void picked (Gdk.RGBA color);
|
||||
public signal void cancelled ();
|
||||
public signal void moved (Gdk.RGBA color);
|
||||
|
||||
const string dark_border_color_string = "#333333";
|
||||
private Gdk.RGBA dark_border_color = Gdk.RGBA();
|
||||
|
||||
const string bright_border_color_string = "#FFFFFF";
|
||||
private Gdk.RGBA bright_border_color = Gdk.RGBA();
|
||||
|
||||
// 1. Snapsize is the amount of pixel going to be magnified by the zoomlevel.
|
||||
// 2. The snapsize must be odd to have a 1px magnifier center.
|
||||
// 3. Asure that snapsize*max_zoomlevel+shadow_width*2 is smaller than 2 * get_screen ().get_display ().get_maximal_cursor_size()
|
||||
// Valid: snapsize = 31, max_zoomlevel = 7, shadow_width = 15 --> 247px
|
||||
// get_maximal_cursor_size = 128 --> 256px
|
||||
// Otherwise the cursor starts to flicker. See https://github.com/stuartlangridge/ColourPicker/issues/6#issuecomment-277972290
|
||||
// and https://github.com/RonnyDo/ColorPicker/issues/19
|
||||
int snapsize = 31;
|
||||
int min_zoomlevel = 2;
|
||||
int max_zoomlevel = 7;
|
||||
int zoomlevel = 3;
|
||||
int shadow_width = 15;
|
||||
|
||||
private Gdk.Cursor magnifier = null;
|
||||
|
||||
construct {
|
||||
type = Gtk.WindowType.POPUP;
|
||||
}
|
||||
|
||||
|
||||
public Picker () {
|
||||
stick ();
|
||||
set_resizable (true);
|
||||
set_deletable (false);
|
||||
set_skip_taskbar_hint (true);
|
||||
set_skip_pager_hint (true);
|
||||
set_keep_above (true);
|
||||
|
||||
|
||||
dark_border_color.parse (dark_border_color_string);
|
||||
bright_border_color.parse (bright_border_color_string);
|
||||
|
||||
// restore zoomlevel
|
||||
if (settings.zoomlevel >= min_zoomlevel && settings.zoomlevel <= max_zoomlevel) {
|
||||
zoomlevel = settings.zoomlevel;
|
||||
}
|
||||
|
||||
var screen = get_screen ();
|
||||
set_default_size (screen.get_width (), screen.get_height ());
|
||||
}
|
||||
|
||||
|
||||
public override bool button_release_event (Gdk.EventButton e) {
|
||||
if (e.button != 1) {
|
||||
return true;
|
||||
}
|
||||
|
||||
Gdk.RGBA color = get_color_at ((int) e.x_root, (int) e.y_root);
|
||||
picked (color);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
public override bool draw (Cairo.Context cr) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
public override bool motion_notify_event (Gdk.EventMotion e) {
|
||||
Gdk.RGBA color = get_color_at ((int) e.x_root, (int) e.y_root);
|
||||
moved (color);
|
||||
|
||||
set_magnifier_cursor ();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
public override bool scroll_event (Gdk.EventScroll e) {
|
||||
switch (e.direction) {
|
||||
case Gdk.ScrollDirection.UP:
|
||||
if (zoomlevel < max_zoomlevel) {
|
||||
zoomlevel++;
|
||||
}
|
||||
set_magnifier_cursor ();
|
||||
break;
|
||||
case Gdk.ScrollDirection.DOWN:
|
||||
if (zoomlevel > min_zoomlevel) {
|
||||
zoomlevel--;
|
||||
}
|
||||
set_magnifier_cursor ();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
public void set_magnifier_cursor () {
|
||||
// draw cursor
|
||||
int px, py;
|
||||
get_pointer (out px, out py);
|
||||
|
||||
var radius = snapsize * zoomlevel / 2;
|
||||
|
||||
// take screenshot
|
||||
|
||||
var latest_pb = snap (px - snapsize / 2, py - snapsize / 2, snapsize, snapsize);
|
||||
|
||||
// Zoom that screenshot up, and grab a snapsize-sized piece from the middle
|
||||
var scaled_pb = latest_pb.scale_simple (snapsize * zoomlevel + shadow_width * 2 , snapsize * zoomlevel + shadow_width * 2 , Gdk.InterpType.NEAREST);
|
||||
|
||||
|
||||
// Create the base surface for our cursor
|
||||
var base_surface = new Cairo.ImageSurface (Cairo.Format.ARGB32, snapsize * zoomlevel + shadow_width * 2 , snapsize * zoomlevel + shadow_width * 2);
|
||||
var base_context = new Cairo.Context (base_surface);
|
||||
|
||||
|
||||
// Create the circular path on our base surface
|
||||
base_context.arc (radius + shadow_width, radius + shadow_width, radius, 0, 2 * Math.PI);
|
||||
|
||||
// Paste in the screenshot
|
||||
Gdk.cairo_set_source_pixbuf (base_context, scaled_pb, 0, 0);
|
||||
|
||||
// Clip to that circular path, keeping the path around for later, and paint the pasted screenshot
|
||||
base_context.save ();
|
||||
base_context.clip_preserve ();
|
||||
base_context.paint ();
|
||||
base_context.restore ();
|
||||
|
||||
|
||||
// Draw a shadow as outside magnifier border
|
||||
double shadow_alpha = 0.6;
|
||||
base_context.set_line_width (1);
|
||||
|
||||
for (int i = 0; i <= shadow_width; i++) {
|
||||
base_context.arc (radius + shadow_width, radius + shadow_width, radius + shadow_width- i, 0, 2 * Math.PI);
|
||||
Gdk.RGBA shadow_color = Gdk.RGBA();
|
||||
shadow_color.parse(dark_border_color_string);
|
||||
shadow_color.alpha = shadow_alpha / ((shadow_width - i + 1)*(shadow_width - i + 1));
|
||||
Gdk.cairo_set_source_rgba (base_context, shadow_color);
|
||||
base_context.stroke ();
|
||||
}
|
||||
|
||||
|
||||
// Draw an outside bright magnifier border
|
||||
Gdk.cairo_set_source_rgba (base_context, bright_border_color);
|
||||
base_context.arc (radius + shadow_width, radius + shadow_width, radius - 1, 0, 2 * Math.PI);
|
||||
base_context.stroke();
|
||||
|
||||
|
||||
// Draw inside square
|
||||
base_context.set_line_width (1);
|
||||
|
||||
Gdk.cairo_set_source_rgba (base_context, dark_border_color);
|
||||
base_context.move_to (radius + shadow_width - zoomlevel, radius + shadow_width - zoomlevel);
|
||||
base_context.line_to (radius + shadow_width + zoomlevel, radius + shadow_width - zoomlevel);
|
||||
base_context.line_to (radius + shadow_width + zoomlevel, radius + shadow_width + zoomlevel);
|
||||
base_context.line_to (radius + shadow_width - zoomlevel, radius + shadow_width + zoomlevel);
|
||||
base_context.close_path ();
|
||||
base_context.stroke ();
|
||||
|
||||
Gdk.cairo_set_source_rgba (base_context, bright_border_color);
|
||||
base_context.move_to (radius + shadow_width - zoomlevel + 1, radius + shadow_width - zoomlevel + 1);
|
||||
base_context.line_to (radius + shadow_width + zoomlevel - 1, radius + shadow_width - zoomlevel + 1);
|
||||
base_context.line_to (radius + shadow_width + zoomlevel - 1, radius + shadow_width + zoomlevel - 1);
|
||||
base_context.line_to (radius + shadow_width - zoomlevel + 1, radius + shadow_width + zoomlevel - 1);
|
||||
base_context.close_path ();
|
||||
base_context.stroke ();
|
||||
|
||||
|
||||
// turn the base surface into a pixbuf and thence a cursor
|
||||
var drawn_pb = Gdk.pixbuf_get_from_surface(base_surface, 0, 0, base_surface.get_width(), base_surface.get_height());
|
||||
|
||||
magnifier = new Gdk.Cursor.from_pixbuf(
|
||||
get_screen ().get_display (),
|
||||
drawn_pb,
|
||||
drawn_pb.get_width () / 2,
|
||||
drawn_pb.get_height () / 2);
|
||||
|
||||
/*
|
||||
uint max_cursor_width, max_cursor_height, default_cursor_width, default_cursor_height;;
|
||||
get_screen ().get_display ().get_maximal_cursor_size (out max_cursor_width, out max_cursor_height);
|
||||
print ("\n\nCursor size is " + drawn_pb.get_width().to_string () + "x" + drawn_pb.get_height().to_string ());
|
||||
print ("\nAllowed size is " + max_cursor_width.to_string () + "x" + max_cursor_height.to_string ());
|
||||
print ("\nDefault size is " + get_screen ().get_display ().get_default_cursor_size ().to_string ());
|
||||
*/
|
||||
|
||||
// Set the cursor
|
||||
var manager = Gdk.Display.get_default ().get_device_manager ();
|
||||
manager.get_client_pointer ().grab (
|
||||
get_window (),
|
||||
Gdk.GrabOwnership.APPLICATION,
|
||||
true,
|
||||
Gdk.EventMask.BUTTON_PRESS_MASK | Gdk.EventMask.POINTER_MOTION_MASK | Gdk.EventMask.SCROLL_MASK,
|
||||
magnifier,
|
||||
Gdk.CURRENT_TIME);
|
||||
|
||||
}
|
||||
|
||||
|
||||
public Gdk.Pixbuf? snap (int x, int y, int w, int h) {
|
||||
var root = Gdk.get_default_root_window ();
|
||||
|
||||
var screenshot = Gdk.pixbuf_get_from_window (root, x, y, w, h);
|
||||
return screenshot;
|
||||
}
|
||||
|
||||
|
||||
public override bool key_press_event (Gdk.EventKey e) {
|
||||
if (e.keyval == Gdk.Key.Escape) {
|
||||
cancelled ();
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public Gdk.RGBA get_color_at (int x, int y) {
|
||||
var root = Gdk.get_default_root_window ();
|
||||
Gdk.Pixbuf? pixbuf = Gdk.pixbuf_get_from_window (root, x, y, 1, 1);
|
||||
|
||||
if (pixbuf != null) {
|
||||
// see https://hackage.haskell.org/package/gtk3-0.14.6/docs/Graphics-UI-Gtk-Gdk-Pixbuf.html
|
||||
uint8 red = pixbuf.get_pixels()[0];
|
||||
uint8 green = pixbuf.get_pixels()[1];
|
||||
uint8 blue = pixbuf.get_pixels()[2];
|
||||
|
||||
Gdk.RGBA color = Gdk.RGBA();
|
||||
string spec = "rgb(" + red.to_string() + "," + green.to_string() + "," + blue.to_string() + ")";
|
||||
if (color.parse (spec)) {
|
||||
return color;
|
||||
} else {
|
||||
stdout.printf("ERROR: Parse pixel rgb values failed.");
|
||||
}
|
||||
}
|
||||
|
||||
// fallback: default RGBA color
|
||||
stdout.printf("ERROR: Gdk.pixbuf_get_from_window failed");
|
||||
return Gdk.RGBA ();
|
||||
}
|
||||
|
||||
|
||||
public override void show_all () {
|
||||
base.show_all ();
|
||||
|
||||
var manager = Gdk.Display.get_default ().get_device_manager ();
|
||||
var pointer = manager.get_client_pointer ();
|
||||
var keyboard = pointer.get_associated_device ();
|
||||
var window = get_window ();
|
||||
|
||||
var status = pointer.grab (window,
|
||||
Gdk.GrabOwnership.NONE,
|
||||
false,
|
||||
Gdk.EventMask.BUTTON_PRESS_MASK | Gdk.EventMask.BUTTON_RELEASE_MASK | Gdk.EventMask.POINTER_MOTION_MASK,
|
||||
new Gdk.Cursor.for_display (window.get_display (), Gdk.CursorType.CROSSHAIR),
|
||||
Gtk.get_current_event_time ());
|
||||
|
||||
if (status != Gdk.GrabStatus.SUCCESS) {
|
||||
pointer.ungrab (Gtk.get_current_event_time ());
|
||||
}
|
||||
|
||||
// show magnifier
|
||||
set_magnifier_cursor ();
|
||||
|
||||
if (keyboard != null) {
|
||||
status = keyboard.grab (window,
|
||||
Gdk.GrabOwnership.NONE,
|
||||
false,
|
||||
Gdk.EventMask.KEY_PRESS_MASK,
|
||||
null,
|
||||
Gtk.get_current_event_time ());
|
||||
|
||||
if (status != Gdk.GrabStatus.SUCCESS) {
|
||||
keyboard.ungrab (Gtk.get_current_event_time ());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public new void close () {
|
||||
// save zoomlevel
|
||||
settings.zoomlevel = zoomlevel;
|
||||
|
||||
get_window ().set_cursor (null);
|
||||
base.close ();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||