[app] Dropped HarbourImageProvider

HarbourHighlightIcon works better
This commit is contained in:
Slava Monich 2020-10-23 01:53:04 +03:00
parent a03e4e3dc7
commit 94a5f981a7
4 changed files with 32 additions and 44 deletions

View file

@ -178,7 +178,6 @@ HEADERS += \
HEADERS += \
$$HARBOUR_INCLUDE_DIR/HarbourDisplayBlanking.h \
$$HARBOUR_INCLUDE_DIR/HarbourImageProvider.h \
$$HARBOUR_INCLUDE_DIR/HarbourJson.h \
$$HARBOUR_INCLUDE_DIR/HarbourMediaPlugin.h \
$$HARBOUR_INCLUDE_DIR/HarbourPluginLoader.h \
@ -192,7 +191,6 @@ HEADERS += \
SOURCES += \
$$HARBOUR_SRC_DIR/HarbourDisplayBlanking.cpp \
$$HARBOUR_SRC_DIR/HarbourImageProvider.cpp \
$$HARBOUR_SRC_DIR/HarbourJson.cpp \
$$HARBOUR_SRC_DIR/HarbourMce.cpp \
$$HARBOUR_SRC_DIR/HarbourMediaPlugin.cpp \

View file

@ -1,6 +1,6 @@
/*
Copyright (C) 2015-2018 Jolla Ltd.
Copyright (C) 2015-2018 Slava Monich <slava.monich@jolla.com>
Copyright (C) 2015-2020 Jolla Ltd.
Copyright (C) 2015-2020 Slava Monich <slava.monich@jolla.com>
You may use this file under the terms of BSD license as follows:
@ -8,14 +8,15 @@
modification, are permitted provided that the following conditions
are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
* Neither the name of Jolla Ltd nor the names of its contributors may
be used to endorse or promote products derived from this software
without specific prior written permission.
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer
in the documentation and/or other materials provided with the
distribution.
3. Neither the names of the copyright holders nor the names of its
contributors may be used to endorse or promote products derived
from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
@ -33,6 +34,8 @@
import QtQuick 2.0
import Sailfish.Silica 1.0
import "harbour"
Column {
id: root
anchors {
@ -73,7 +76,7 @@ Column {
width: parent.width
height: Math.max(storageLabel.height, bookCount.height)
Image {
HarbourHighlightIcon {
id: icon
anchors {
left: parent.left
@ -84,7 +87,8 @@ Column {
height: storageLabel.height*3/4
sourceSize.height: height
fillMode: Image.PreserveAspectFit
source: "image://harbour/" + Qt.resolvedUrl("images/sdcard.svg") + "?" + storageLabel.color
source: "images/sdcard.svg"
highlightColor: storageLabel.color
}
Label {

View file

@ -1,35 +1,23 @@
<?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"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="80"
height="60"
version="1.1"
inkscape:version="0.92.4 (unknown)"
sodipodi:docname="sdcard.svg">
<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>
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"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="80"
height="60"
version="1.1"
inkscape:version="0.92.4 (unknown)"
sodipodi:docname="sdcard.svg">
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
transform="translate(-654.28125,-625.21875)">
inkscape:groupmode="layer"
transform="translate(-654.28125,-625.21875)">
<path
style="fill:#000000;fill-opacity:1;stroke:none"
d="m 730.15625,628.22001 -22.0625,0.15625 -4.0625,0 -45,0 -1.25,0 -0.25,0.0625 -0.25,0.3125 0,52.84375 0.0625,0.5 0.40625,0.125 5.0625,0 19.96875,0 3.8125,-2.875 4.9375,0 0,1.96875 0.28125,0.5625 0.46875,0.28125 7.46875,0.0625 8.21875,-7 21.65625,0 1.09375,0 0.5625,-1.125 0,-44.96875 -0.40625,-0.59375 -0.71875,-0.3125 z m -61.125,10.28125 c 1.82713,-0.0787 3.62648,0.47484 4.21875,1.53125 1.48537,-2.34183 9.15625,-2.10021 9.15625,2.25 l 0,19.03125 -4.125,0 0,-17.15625 c -0.56407,-1.32417 -2.82364,-1.29592 -3.3125,-0.125 l 0,17.4375 -1.5,0 -0.46875,-0.0625 -1.46875,0 0,-17.4375 c -0.47005,-1.16523 -2.65468,-1.16223 -3.21875,0.15625 l 0,17.125 -4.03125,0 0,-19.03125 c 0,-2.46854 2.40084,-3.61757 4.75,-3.71875 z m 48.75,0 c 3.4878,0.0824 6.57521,3.26298 6.5,7.09375 0.002,0.0979 0.002,0.21668 0,0.3125 -0.0733,3.83086 -3.0122,6.86173 -6.5,6.78125 -3.4878,-0.0805 -6.54396,-3.26673 -6.46875,-7.09375 -0.002,-0.0977 -0.002,-0.21285 0,-0.3125 0.0733,-3.82899 2.97907,-6.86174 6.46875,-6.78125 z M 685.75,638.65751 c 1.25233,0 2.25,1.03607 2.25,2.3125 0,1.27641 -0.99767,2.3125 -2.25,2.3125 -1.25233,0 -2.28125,-1.03609 -2.28125,-2.3125 0,-1.27643 1.02892,-2.3125 2.28125,-2.3125 z m 8.71875,0.125 2.9375,0 c 1.2541,0 2.28125,0.89041 2.28125,2 0,1.10767 -1.02715,2.03125 -2.28125,2.03125 l -2.21875,0 c -1.01344,0.25296 -1.82345,0.98505 -2.15625,1.9375 -0.54338,1.55419 0.34988,3.22682 1.96875,3.75 l 2.40625,0 0.21875,0.0312 c 0.17298,0.0153 0.36579,0.0439 0.53125,0.0937 1.18078,0.36794 1.79053,1.51231 1.375,2.5625 -0.31776,0.79913 -1.16797,1.34375 -2.125,1.34375 l -2.4375,-0.0312 c -3.34114,-0.19164 -6.06943,-2.69748 -6.5,-5.96875 -0.4945,-3.76 2.18316,-7.19883 6,-7.6875 l 0,-0.0625 z m 10.09375,0 c 0.3134,-0.0123 0.61622,0.0366 0.9375,0.0937 0.62987,-0.11307 1.28578,-0.0985 1.90625,0.0625 2.53641,0.65157 4.07982,3.36426 3.46875,6.0625 l -3.78125,0 -0.0312,-1.09375 c 0.002,-0.0537 0.002,-0.13193 0,-0.1875 -0.0526,-0.82788 -0.80872,-1.45033 -1.71875,-1.40625 -0.91003,0.046 -1.61139,0.76203 -1.5625,1.59375 l 0,4.8125 0,3.125 0,0.6875 -3.78125,0 0,-8.71875 0,-0.34375 c 0.0113,-0.16481 0.0362,-0.30778 0.0625,-0.46875 0.37675,-2.39285 2.30619,-4.1329 4.5,-4.21875 z m 13.21875,3.8125 c -1.61889,0 -2.875,1.35016 -2.875,3 0,1.6502 1.25611,3 2.875,3 1.61889,0 3,-1.3498 3,-3 0,-1.64984 -1.38111,-3 -3,-3 z m -31.9375,1.0625 c 1.25222,0.0632 2.21642,1.12993 2.15625,2.40625 l 0,7.125 -4.53125,0 0,-7.125 c -0.004,-0.0751 -0.004,-0.14402 0,-0.21875 0.062,-1.27632 1.12466,-2.25075 2.375,-2.1875 z m 15.78125,9.875 c 1.77351,0.002 2.96875,0.0312 2.96875,0.0312 l -0.84375,2.4375 c 0,0 -6.58341,0.0146 -8.28125,0.0625 -1.56246,0.0422 -3.8125,-0.011 -3.8125,0.84375 0,0.66881 3.34677,1.44616 5.1875,2 2.71879,0.82404 5.00792,2.08047 4.40625,4.75 -0.84798,3.77911 -5.48319,3.5625 -11.09375,3.5625 -3.93905,0 -7.625,-0.25 -7.625,-0.25 l 1.53125,-4.28125 c 0,0 3.25363,0.39592 7.125,0.46875 2.49881,0.0479 3.34375,0.002 3.34375,-0.59375 0,-0.73206 -2.29471,-1.15725 -3.75,-1.71875 -1.52486,-0.596 -4.05245,-1.90761 -3.84375,-3.8125 0.1523,-1.46796 1.43869,-2.9988 8.21875,-3.34375 2.35027,-0.12074 4.69523,-0.15817 6.46875,-0.15625 z m 5.375,0.0312 c 2.11712,-0.006 2.87095,0.0184 4.78125,0.0625 0.47757,0.0153 1.28849,0.10627 2.28125,0.25 l -4.09375,2.5625 c -0.65243,-0.16865 -1.38653,-0.30027 -2.1875,-0.375 -0.8837,-0.0843 -1.10418,-0.0433 -1.625,-0.0625 L 707,653.56376 z m 10.34375,0.875 c 0.48134,0.13223 1.15307,0.38294 1.625,0.59375 l -6.90625,2.3125 c -0.0395,-0.0268 -0.0874,-0.0376 -0.125,-0.0625 -0.13726,-0.0958 -0.39328,-0.31235 -0.5625,-0.40625 l 5.96875,-2.4375 z m 3.34375,1.3125 c 1.29923,0.65157 2.40092,1.47148 2.96875,2.53125 0.50578,0.93328 0.39913,1.90088 -0.1875,2.84375 -4.67234,5.91493 -16.82844,5.86511 -21.21875,6.0625 l 1.90625,-5.46875 c 1.16009,-0.0441 2.83971,-0.20695 3.84375,-0.40625 1.00216,-0.20314 1.88983,-0.46505 2.625,-0.78125 0.722,-0.31429 1.28773,-0.68498 1.65625,-1.0625 0.36287,-0.37178 0.50143,-0.75956 0.4375,-1.15625 -0.015,-0.0974 -0.0486,-0.18544 -0.0937,-0.28125 -0.0263,-0.0613 -0.0505,-0.1281 -0.0937,-0.1875 l 8.15625,-2.09375 z"
style="fill:#ffffff;fill-opacity:1;stroke:none"
d="m 730.15625,628.22001 -22.0625,0.15625 -4.0625,0 -45,0 -1.25,0 -0.25,0.0625 -0.25,0.3125 0,52.84375 0.0625,0.5 0.40625,0.125 5.0625,0 19.96875,0 3.8125,-2.875 4.9375,0 0,1.96875 0.28125,0.5625 0.46875,0.28125 7.46875,0.0625 8.21875,-7 21.65625,0 1.09375,0 0.5625,-1.125 0,-44.96875 -0.40625,-0.59375 -0.71875,-0.3125 z m -61.125,10.28125 c 1.82713,-0.0787 3.62648,0.47484 4.21875,1.53125 1.48537,-2.34183 9.15625,-2.10021 9.15625,2.25 l 0,19.03125 -4.125,0 0,-17.15625 c -0.56407,-1.32417 -2.82364,-1.29592 -3.3125,-0.125 l 0,17.4375 -1.5,0 -0.46875,-0.0625 -1.46875,0 0,-17.4375 c -0.47005,-1.16523 -2.65468,-1.16223 -3.21875,0.15625 l 0,17.125 -4.03125,0 0,-19.03125 c 0,-2.46854 2.40084,-3.61757 4.75,-3.71875 z m 48.75,0 c 3.4878,0.0824 6.57521,3.26298 6.5,7.09375 0.002,0.0979 0.002,0.21668 0,0.3125 -0.0733,3.83086 -3.0122,6.86173 -6.5,6.78125 -3.4878,-0.0805 -6.54396,-3.26673 -6.46875,-7.09375 -0.002,-0.0977 -0.002,-0.21285 0,-0.3125 0.0733,-3.82899 2.97907,-6.86174 6.46875,-6.78125 z M 685.75,638.65751 c 1.25233,0 2.25,1.03607 2.25,2.3125 0,1.27641 -0.99767,2.3125 -2.25,2.3125 -1.25233,0 -2.28125,-1.03609 -2.28125,-2.3125 0,-1.27643 1.02892,-2.3125 2.28125,-2.3125 z m 8.71875,0.125 2.9375,0 c 1.2541,0 2.28125,0.89041 2.28125,2 0,1.10767 -1.02715,2.03125 -2.28125,2.03125 l -2.21875,0 c -1.01344,0.25296 -1.82345,0.98505 -2.15625,1.9375 -0.54338,1.55419 0.34988,3.22682 1.96875,3.75 l 2.40625,0 0.21875,0.0312 c 0.17298,0.0153 0.36579,0.0439 0.53125,0.0937 1.18078,0.36794 1.79053,1.51231 1.375,2.5625 -0.31776,0.79913 -1.16797,1.34375 -2.125,1.34375 l -2.4375,-0.0312 c -3.34114,-0.19164 -6.06943,-2.69748 -6.5,-5.96875 -0.4945,-3.76 2.18316,-7.19883 6,-7.6875 l 0,-0.0625 z m 10.09375,0 c 0.3134,-0.0123 0.61622,0.0366 0.9375,0.0937 0.62987,-0.11307 1.28578,-0.0985 1.90625,0.0625 2.53641,0.65157 4.07982,3.36426 3.46875,6.0625 l -3.78125,0 -0.0312,-1.09375 c 0.002,-0.0537 0.002,-0.13193 0,-0.1875 -0.0526,-0.82788 -0.80872,-1.45033 -1.71875,-1.40625 -0.91003,0.046 -1.61139,0.76203 -1.5625,1.59375 l 0,4.8125 0,3.125 0,0.6875 -3.78125,0 0,-8.71875 0,-0.34375 c 0.0113,-0.16481 0.0362,-0.30778 0.0625,-0.46875 0.37675,-2.39285 2.30619,-4.1329 4.5,-4.21875 z m 13.21875,3.8125 c -1.61889,0 -2.875,1.35016 -2.875,3 0,1.6502 1.25611,3 2.875,3 1.61889,0 3,-1.3498 3,-3 0,-1.64984 -1.38111,-3 -3,-3 z m -31.9375,1.0625 c 1.25222,0.0632 2.21642,1.12993 2.15625,2.40625 l 0,7.125 -4.53125,0 0,-7.125 c -0.004,-0.0751 -0.004,-0.14402 0,-0.21875 0.062,-1.27632 1.12466,-2.25075 2.375,-2.1875 z m 15.78125,9.875 c 1.77351,0.002 2.96875,0.0312 2.96875,0.0312 l -0.84375,2.4375 c 0,0 -6.58341,0.0146 -8.28125,0.0625 -1.56246,0.0422 -3.8125,-0.011 -3.8125,0.84375 0,0.66881 3.34677,1.44616 5.1875,2 2.71879,0.82404 5.00792,2.08047 4.40625,4.75 -0.84798,3.77911 -5.48319,3.5625 -11.09375,3.5625 -3.93905,0 -7.625,-0.25 -7.625,-0.25 l 1.53125,-4.28125 c 0,0 3.25363,0.39592 7.125,0.46875 2.49881,0.0479 3.34375,0.002 3.34375,-0.59375 0,-0.73206 -2.29471,-1.15725 -3.75,-1.71875 -1.52486,-0.596 -4.05245,-1.90761 -3.84375,-3.8125 0.1523,-1.46796 1.43869,-2.9988 8.21875,-3.34375 2.35027,-0.12074 4.69523,-0.15817 6.46875,-0.15625 z m 5.375,0.0312 c 2.11712,-0.006 2.87095,0.0184 4.78125,0.0625 0.47757,0.0153 1.28849,0.10627 2.28125,0.25 l -4.09375,2.5625 c -0.65243,-0.16865 -1.38653,-0.30027 -2.1875,-0.375 -0.8837,-0.0843 -1.10418,-0.0433 -1.625,-0.0625 L 707,653.56376 z m 10.34375,0.875 c 0.48134,0.13223 1.15307,0.38294 1.625,0.59375 l -6.90625,2.3125 c -0.0395,-0.0268 -0.0874,-0.0376 -0.125,-0.0625 -0.13726,-0.0958 -0.39328,-0.31235 -0.5625,-0.40625 l 5.96875,-2.4375 z m 3.34375,1.3125 c 1.29923,0.65157 2.40092,1.47148 2.96875,2.53125 0.50578,0.93328 0.39913,1.90088 -0.1875,2.84375 -4.67234,5.91493 -16.82844,5.86511 -21.21875,6.0625 l 1.90625,-5.46875 c 1.16009,-0.0441 2.83971,-0.20695 3.84375,-0.40625 1.00216,-0.20314 1.88983,-0.46505 2.625,-0.78125 0.722,-0.31429 1.28773,-0.68498 1.65625,-1.0625 0.36287,-0.37178 0.50143,-0.75956 0.4375,-1.15625 -0.015,-0.0974 -0.0486,-0.18544 -0.0937,-0.28125 -0.0263,-0.0613 -0.0505,-0.1281 -0.0937,-0.1875 l 8.15625,-2.09375 z"
inkscape:connector-curvature="0"/>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 5.1 KiB

After

Width:  |  Height:  |  Size: 4.7 KiB

View file

@ -39,7 +39,6 @@
#include "BooksSettings.h"
#include "HarbourDebug.h"
#include "HarbourImageProvider.h"
#include "HarbourMediaPlugin.h"
#include "HarbourPolicyPlugin.h"
@ -248,7 +247,6 @@ void ZLibrary::run(ZLApplication* aApp)
BOOKS_QML_PLUGIN_V1, BOOKS_QML_PLUGIN_V2);
HarbourMediaPlugin::registerTypes(engine, BOOKS_QML_PLUGIN,
BOOKS_QML_PLUGIN_V1, BOOKS_QML_PLUGIN_V2);
engine->addImageProvider("harbour", new HarbourImageProvider);
engine->addImageProvider(BooksImageProvider::PROVIDER_ID,
new BooksImageProvider(root));