Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
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:
|
||||
One Color Picker to rule them all! No overhelming menus or settings. An easy tool with the features you need.
|
||||
|
||||
Features:
|
||||
* Pick a color
|
||||
* 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
|
||||
|
||||
@@ -7,11 +7,12 @@
|
||||
<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>
|
||||
<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</li>
|
||||
<li>Choose between multiple <b>Color Formats</b></li>
|
||||
<li>Let the <b>Color History</b> remember your last colors</li>
|
||||
<li>Choose between multiple Color Formats</li>
|
||||
<li>Let the Color History remember your last colors</li>
|
||||
</ul>
|
||||
</description>
|
||||
<provides>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[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;
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
<?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>
|
||||
</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: 24 KiB |
@@ -1,13 +1,39 @@
|
||||
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
|
||||
|
||||
@@ -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
|
||||
@@ -24,15 +24,18 @@ executable(
|
||||
'src/Widgets/ColorArea.vala',
|
||||
'src/Widgets/ColorHistory.vala',
|
||||
'src/Widgets/MousePosition.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,9 +22,9 @@
|
||||
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",
|
||||
@@ -32,14 +32,14 @@ namespace ColorPicker {
|
||||
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 +48,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 +86,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 +107,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,10 +122,35 @@ 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 ();
|
||||
@@ -142,6 +166,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 +183,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 +205,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,7 +228,8 @@ namespace ColorPicker {
|
||||
|
||||
this.present ();
|
||||
});
|
||||
|
||||
|
||||
|
||||
// trigger picker on startup
|
||||
pick_color_button.clicked ();
|
||||
}
|
||||
@@ -226,6 +257,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,46 @@
|
||||
/*
|
||||
* 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 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 {
|
||||
|
||||
@@ -46,25 +47,60 @@ namespace ColorPicker {
|
||||
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);
|
||||
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) {
|
||||
// if more colors should be saved as allowed, drop the oldest ones.
|
||||
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) {
|
||||
if (color_list.size >= max_colors) {
|
||||
remove_oldest_color ();
|
||||
}
|
||||
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);
|
||||
store_colors ();
|
||||
}
|
||||
|
||||
public Gee.ArrayList<Gdk.RGBA?> get_color_list () {
|
||||
@@ -74,7 +110,6 @@ namespace ColorPicker {
|
||||
|
||||
/* Widget is asked to draw itself */
|
||||
public override bool draw (Cairo.Context ctx) {
|
||||
|
||||
|
||||
int width = get_allocated_width (); // better element_width / amount
|
||||
int height = get_allocated_height ();
|
||||
@@ -89,7 +124,7 @@ 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 ();
|
||||
}
|
||||
@@ -184,8 +219,6 @@ namespace ColorPicker {
|
||||
|
||||
|
||||
public override bool button_release_event (Gdk.EventButton e) {
|
||||
|
||||
stdout.printf("clicked");
|
||||
if (e.button != 1) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
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);
|
||||
|
||||