[-]
[+]
|
Changed |
_service:tar_git:harbour-counter.changes
|
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-counter.spec
^
|
|
[-]
[+]
|
Changed |
_service
^
|
@@ -2,6 +2,6 @@
<service name="tar_git">
<param name="url">https://github.com/monich/harbour-counter.git</param>
<param name="branch">master</param>
- <param name="revision">19207d9</param>
+ <param name="revision">652c57a</param>
</service>
</services>
\ No newline at end of file
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-counter-1.0.22.tar.gz/harbour-counter.pro
^
|
@@ -100,7 +100,7 @@
# Icons
-ICON_SIZES = 86 108 128 256
+ICON_SIZES = 86 108 128 172 256
for(s, ICON_SIZES) {
icon_target = icon_$${s}
icon_dir = icons/$${s}x$${s}
|
|
Added |
_service:tar_git:harbour-counter-1.0.22.tar.gz/icons/172x172/harbour-counter.png
^
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-counter-1.0.22.tar.gz/icons/harbour-counter.svg
^
|
@@ -1,10 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!-- Created with Inkscape (http://www.inkscape.org/) -->
-
<svg
- xmlns:dc="http://purl.org/dc/elements/1.1/"
- xmlns:cc="http://creativecommons.org/ns#"
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
@@ -12,11 +7,10 @@
width="86"
height="86"
version="1.1"
- inkscape:version="0.92.4 (unknown)"
sodipodi:docname="harbour-counter.svg">
<defs>
<linearGradient
- id="SVGID_1_"
+ id="gradient"
gradientUnits="userSpaceOnUse"
x1="43"
y1="86"
@@ -30,54 +24,26 @@
style="stop-color:#7a6e6f;stop-opacity:1"/>
</linearGradient>
</defs>
- <metadata>
- <rdf:RDF>
- <cc:Work rdf:about="">
- <dc:format>image/svg+xml</dc:format>
- <dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/>
- <dc:title/>
- </cc:Work>
- </rdf:RDF>
- </metadata>
- <g
- inkscape:label="Layer 1"
- inkscape:groupmode="layer"
- transform="translate(0,-966.36216)">
- <g
- transform="translate(0,966.36216)">
- <rect
- y="0"
- x="0"
- style="opacity:0;fill:#ffffff"
- width="86"
- height="86"/>
- <linearGradient
- gradientUnits="userSpaceOnUse"
- x1="12.8"
- y1="73.2"
- x2="73.2"
- y2="12.8">
- <stop
- offset="0"
- style="stop-color:#e36c34"/>
- <stop
- offset="1"
- style="stop-color:#ffb757"/>
- </linearGradient>
- <circle
- style="fill:url(#SVGID_1_)"
- cx="43"
- cy="43"
- r="42.7"/>
- </g>
+ <g>
+ <rect
+ height="86"
+ width="86"
+ style="opacity:0;fill:#ffffff"
+ x="0"
+ y="0"/>
+ <circle
+ r="42.7"
+ cy="43"
+ cx="43"
+ style="fill:url(#gradient)"/>
<path
- style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;vector-effect:none;fill:#f9f8d9;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:8;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
- d="m 42.939458,989.36262 a 4,4 0 0 0 -3.93916,4 v 11.94182 H 27.057829 a 4,4 0 1 0 0,8 h 11.942469 v 11.9437 a 4,4 0 1 0 8,0 v -11.9437 h 11.942469 a 4,4 0 1 0 0,-8 H 47 v -11.94182 a 4,4 0 0 0 -4,-4 z"
+ style="fill:#f9f8d9;fill-opacity:1;fill-rule:evenodd;stroke:none"
+ d="m 42.93916,23.05677 a 4,4 0 0 0 -3.93916,4 V 39 H 27.057531 a 4,4 0 1 0 0,8 H 39 v 11.9437 a 4,4 0 1 0 8,0 V 47 h 11.942469 a 4,4 0 1 0 0,-8 H 47 V 27.05677 a 4,4 0 0 0 -4,-4 z"
inkscape:connector-curvature="0"/>
<circle
style="opacity:0.25;fill:#f9f8d9"
cx="43"
- cy="1009.3622"
- r="32.025"/>
+ cy="43"
+ r="32"/>
</g>
</svg>
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-counter-1.0.22.tar.gz/qml/NumberPanel.qml
^
|
@@ -61,10 +61,10 @@
onNumberChanged: panel.updateNumber(number)
}
- property int spinnerCount
-
delegate: NumberSpinner {
+ property bool _completed
readonly property int digit: model.digit
+
anchors.verticalCenter: parent ? parent.verticalCenter : undefined
digitWidth: Math.ceil(sample.paintedWidth)
digitHeight: Math.ceil(sample.paintedHeight)
@@ -75,9 +75,20 @@
hasBackground: panel.hasBackground
backgroundColor: panel.backgroundColor
horizontalMargins: panel.horizontalMargins
- Component.onCompleted: setNumber(digit)
- onDigitChanged: setNumber(digit)
- onNumberChanged: model.digit = number
+ Component.onCompleted: {
+ setNumber(digit)
+ _completed = true
+ }
+ onDigitChanged: {
+ if (_completed) {
+ setNumber(digit)
+ }
+ }
+ onNumberChanged: {
+ if (panel._completed) {
+ model.digit = number
+ }
+ }
}
}
}
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-counter-1.0.22.tar.gz/src/CounterDigitsModel.cpp
^
|
@@ -145,7 +145,7 @@
const QString prevNumberString(iPrivate->iNumberString);
iPrivate->iNumberString[row] = c;
- HDEBUG(prevNumberString << "=>" << iPrivate->iNumberString);
+ HDEBUG(row << c << prevNumberString << "=>" << iPrivate->iNumberString);
iPrivate->iNumber = iPrivate->iNumberString.toUInt();
iPrivate->iSignificantDigits = iPrivate->calculateSignificantDigits();
@@ -180,8 +180,10 @@
HDEBUG(prevNumberString << "=>" << newNumberString);
const QVector<int> roles(1, Qt::DisplayRole);
+ const uint newOff = newNumberString.length() - iPrivate->iCount;
+ const uint prevOff = prevNumberString.length() - iPrivate->iCount;
for (uint i = 0; i < iPrivate->iCount; i++) {
- if (newNumberString.at(i) != prevNumberString.at(i)) {
+ if (newNumberString.at(newOff + i) != prevNumberString.at(prevOff + i)) {
const QModelIndex modelIndex(index(i));
Q_EMIT dataChanged(modelIndex, modelIndex, roles);
}
@@ -203,10 +205,15 @@
{
if (aCount != iPrivate->iCount) {
if (aCount > iPrivate->iCount) {
- beginInsertRows(QModelIndex(), 0, aCount - iPrivate->iCount - 1);
+ const uint prevCount = iPrivate->iCount;
+ beginInsertRows(QModelIndex(), 0, aCount - prevCount - 1);
iPrivate->iNumberString = iPrivate->iNumberString.rightJustified(aCount, '0');
iPrivate->iCount = aCount;
endInsertRows();
+ // Make sure other delegates get updated. It doesn't seem to
+ // be necessary but without they keep showing old values
+ Q_EMIT dataChanged(index(aCount - prevCount), index(aCount - 1),
+ QVector<int>(1, Qt::DisplayRole));
} else {
const uint prevSignificantDigits = iPrivate->iSignificantDigits;
const uint prevNumber = iPrivate->iNumber;
|