Replace image png for svg
This commit is contained in:
parent
cff22afb63
commit
a5b1eeb831
Binary file not shown.
BIN
images/add.png
BIN
images/add.png
Binary file not shown.
Before Width: | Height: | Size: 437 B |
|
@ -0,0 +1,93 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<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"
|
||||
version="1.1"
|
||||
id="Capa_1"
|
||||
x="0px"
|
||||
y="0px"
|
||||
viewBox="0 0 32 32"
|
||||
xml:space="preserve"
|
||||
width="32"
|
||||
height="32"><metadata
|
||||
id="metadata45"><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></dc:title></cc:Work></rdf:RDF></metadata><defs
|
||||
id="defs43" />
|
||||
<g
|
||||
id="g8"
|
||||
transform="scale(2)">
|
||||
<g
|
||||
id="g6">
|
||||
<path
|
||||
d="M 8,0 C 3.589,0 0,3.589 0,8 c 0,4.411 3.589,8 8,8 4.411,0 8,-3.589 8,-8 C 16,3.589 12.411,0 8,0 Z M 8,14 C 4.691,14 2,11.309 2,8 2,4.691 4.691,2 8,2 c 3.309,0 6,2.691 6,6 0,3.309 -2.691,6 -6,6 z"
|
||||
id="path2" />
|
||||
<polygon
|
||||
points="9,7 9,4 7,4 7,7 4,7 4,9 7,9 7,12 9,12 9,9 12,9 12,7 "
|
||||
id="polygon4" />
|
||||
</g>
|
||||
</g>
|
||||
<g
|
||||
id="g10"
|
||||
transform="translate(8,8)">
|
||||
</g>
|
||||
<g
|
||||
id="g12"
|
||||
transform="translate(8,8)">
|
||||
</g>
|
||||
<g
|
||||
id="g14"
|
||||
transform="translate(8,8)">
|
||||
</g>
|
||||
<g
|
||||
id="g16"
|
||||
transform="translate(8,8)">
|
||||
</g>
|
||||
<g
|
||||
id="g18"
|
||||
transform="translate(8,8)">
|
||||
</g>
|
||||
<g
|
||||
id="g20"
|
||||
transform="translate(8,8)">
|
||||
</g>
|
||||
<g
|
||||
id="g22"
|
||||
transform="translate(8,8)">
|
||||
</g>
|
||||
<g
|
||||
id="g24"
|
||||
transform="translate(8,8)">
|
||||
</g>
|
||||
<g
|
||||
id="g26"
|
||||
transform="translate(8,8)">
|
||||
</g>
|
||||
<g
|
||||
id="g28"
|
||||
transform="translate(8,8)">
|
||||
</g>
|
||||
<g
|
||||
id="g30"
|
||||
transform="translate(8,8)">
|
||||
</g>
|
||||
<g
|
||||
id="g32"
|
||||
transform="translate(8,8)">
|
||||
</g>
|
||||
<g
|
||||
id="g34"
|
||||
transform="translate(8,8)">
|
||||
</g>
|
||||
<g
|
||||
id="g36"
|
||||
transform="translate(8,8)">
|
||||
</g>
|
||||
<g
|
||||
id="g38"
|
||||
transform="translate(8,8)">
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 1.8 KiB |
|
@ -19,29 +19,6 @@ class ZAZFavorites(unohelper.Base, XJobExecutor):
|
|||
return
|
||||
|
||||
def _create_dialog(self):
|
||||
args = {
|
||||
'Name': 'dialog',
|
||||
'Title': self.TITLE,
|
||||
'Width': 160,
|
||||
'Height': 160,
|
||||
}
|
||||
dlg = app.create_dialog(args)
|
||||
dlg.events = Controllers(dlg)
|
||||
dlg.events.TITLE = self.TITLE
|
||||
|
||||
args = {
|
||||
'Type': 'Button',
|
||||
'Name': 'button_add',
|
||||
'Label': _('~Add'),
|
||||
'ImageURL': app.join(self.IMAGES, 'add.png'),
|
||||
'ImagePosition': 1,
|
||||
'Width': 60,
|
||||
'Height': 15,
|
||||
'Y': 5,
|
||||
'FocusOnClick': False,
|
||||
}
|
||||
dlg.add_control(args)
|
||||
|
||||
columns = (
|
||||
{'Title': _('File Name'), 'MaxWidth': 120},
|
||||
{'Title': 'X', 'HorizontalAlign': 1, 'Resizeable': False, 'ColumnWidth': 10},
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 437 B |
|
@ -0,0 +1,93 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<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"
|
||||
version="1.1"
|
||||
id="Capa_1"
|
||||
x="0px"
|
||||
y="0px"
|
||||
viewBox="0 0 32 32"
|
||||
xml:space="preserve"
|
||||
width="32"
|
||||
height="32"><metadata
|
||||
id="metadata45"><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></dc:title></cc:Work></rdf:RDF></metadata><defs
|
||||
id="defs43" />
|
||||
<g
|
||||
id="g8"
|
||||
transform="scale(2)">
|
||||
<g
|
||||
id="g6">
|
||||
<path
|
||||
d="M 8,0 C 3.589,0 0,3.589 0,8 c 0,4.411 3.589,8 8,8 4.411,0 8,-3.589 8,-8 C 16,3.589 12.411,0 8,0 Z M 8,14 C 4.691,14 2,11.309 2,8 2,4.691 4.691,2 8,2 c 3.309,0 6,2.691 6,6 0,3.309 -2.691,6 -6,6 z"
|
||||
id="path2" />
|
||||
<polygon
|
||||
points="9,7 9,4 7,4 7,7 4,7 4,9 7,9 7,12 9,12 9,9 12,9 12,7 "
|
||||
id="polygon4" />
|
||||
</g>
|
||||
</g>
|
||||
<g
|
||||
id="g10"
|
||||
transform="translate(8,8)">
|
||||
</g>
|
||||
<g
|
||||
id="g12"
|
||||
transform="translate(8,8)">
|
||||
</g>
|
||||
<g
|
||||
id="g14"
|
||||
transform="translate(8,8)">
|
||||
</g>
|
||||
<g
|
||||
id="g16"
|
||||
transform="translate(8,8)">
|
||||
</g>
|
||||
<g
|
||||
id="g18"
|
||||
transform="translate(8,8)">
|
||||
</g>
|
||||
<g
|
||||
id="g20"
|
||||
transform="translate(8,8)">
|
||||
</g>
|
||||
<g
|
||||
id="g22"
|
||||
transform="translate(8,8)">
|
||||
</g>
|
||||
<g
|
||||
id="g24"
|
||||
transform="translate(8,8)">
|
||||
</g>
|
||||
<g
|
||||
id="g26"
|
||||
transform="translate(8,8)">
|
||||
</g>
|
||||
<g
|
||||
id="g28"
|
||||
transform="translate(8,8)">
|
||||
</g>
|
||||
<g
|
||||
id="g30"
|
||||
transform="translate(8,8)">
|
||||
</g>
|
||||
<g
|
||||
id="g32"
|
||||
transform="translate(8,8)">
|
||||
</g>
|
||||
<g
|
||||
id="g34"
|
||||
transform="translate(8,8)">
|
||||
</g>
|
||||
<g
|
||||
id="g36"
|
||||
transform="translate(8,8)">
|
||||
</g>
|
||||
<g
|
||||
id="g38"
|
||||
transform="translate(8,8)">
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 1.8 KiB |
Binary file not shown.
Before Width: | Height: | Size: 233 B |
|
@ -0,0 +1,99 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<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"
|
||||
version="1.1"
|
||||
id="Capa_1"
|
||||
x="0px"
|
||||
y="0px"
|
||||
viewBox="0 0 32 31.999998"
|
||||
xml:space="preserve"
|
||||
width="32"
|
||||
height="31.999998"><metadata
|
||||
id="metadata49"><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></dc:title></cc:Work></rdf:RDF></metadata><defs
|
||||
id="defs47" />
|
||||
<g
|
||||
id="g12"
|
||||
transform="matrix(0.06584362,0,0,0.06585717,0,-0.00329286)">
|
||||
<g
|
||||
id="g10">
|
||||
<path
|
||||
d="m 473.7,485.75 c 6.8,0 12.3,-5.5 12.3,-12.3 v -359.8 c 0,-3.6 -1.6,-7 -4.3,-9.3 L 363,2.85 c -0.2,-0.2 -0.4,-0.3 -0.6,-0.4 -0.3,-0.2 -0.5,-0.4 -0.8,-0.6 -0.4,-0.2 -0.7,-0.4 -1.1,-0.6 -0.3,-0.1 -0.6,-0.3 -0.9,-0.4 -0.4,-0.2 -0.9,-0.3 -1.3,-0.4 -0.3,-0.1 -0.6,-0.2 -0.9,-0.2 -0.8,-0.1 -1.5,-0.2 -2.3,-0.2 H 12.3 C 5.5,0.05 0,5.55 0,12.35 v 461.3 c 0,6.8 5.5,12.3 12.3,12.3 h 461.4 z m -89.2,-24.5 h -283 v -184.1 c 0,-3.7 3,-6.6 6.6,-6.6 h 269.8 c 3.7,0 6.6,3 6.6,6.6 z M 161.8,24.45 h 180.9 v 127.8 c 0,0.8 -0.6,1.4 -1.4,1.4 h -178 c -0.8,0 -1.4,-0.7 -1.4,-1.4 V 24.45 Z m -137.2,0 h 112.8 v 127.8 c 0,14.3 11.6,25.9 25.9,25.9 h 178 c 14.3,0 25.9,-11.6 25.9,-25.9 V 38.75 l 94.2,80.6 v 341.9 H 409 v -184.1 c 0,-17.2 -14,-31.1 -31.1,-31.1 H 108.1 c -17.2,0 -31.1,14 -31.1,31.1 v 184.2 H 24.6 Z"
|
||||
id="path2" />
|
||||
<path
|
||||
d="m 227.4,77.65 h 53.8 v 32.6 c 0,6.8 5.5,12.3 12.3,12.3 6.8,0 12.3,-5.5 12.3,-12.3 v -44.8 c 0,-6.8 -5.5,-12.3 -12.3,-12.3 h -66.1 c -6.8,0 -12.3,5.5 -12.3,12.3 0,6.8 5.6,12.2 12.3,12.2 z"
|
||||
id="path4" />
|
||||
<path
|
||||
d="m 304.5,322.85 h -123 c -6.8,0 -12.3,5.5 -12.3,12.3 0,6.8 5.5,12.3 12.3,12.3 h 123 c 6.8,0 12.3,-5.5 12.3,-12.3 0,-6.8 -5.5,-12.3 -12.3,-12.3 z"
|
||||
id="path6" />
|
||||
<path
|
||||
d="m 304.5,387.75 h -123 c -6.8,0 -12.3,5.5 -12.3,12.3 0,6.8 5.5,12.3 12.3,12.3 h 123 c 6.8,0 12.3,-5.5 12.3,-12.3 0,-6.8 -5.5,-12.3 -12.3,-12.3 z"
|
||||
id="path8" />
|
||||
</g>
|
||||
</g>
|
||||
<g
|
||||
id="g14"
|
||||
transform="translate(-227,-227)">
|
||||
</g>
|
||||
<g
|
||||
id="g16"
|
||||
transform="translate(-227,-227)">
|
||||
</g>
|
||||
<g
|
||||
id="g18"
|
||||
transform="translate(-227,-227)">
|
||||
</g>
|
||||
<g
|
||||
id="g20"
|
||||
transform="translate(-227,-227)">
|
||||
</g>
|
||||
<g
|
||||
id="g22"
|
||||
transform="translate(-227,-227)">
|
||||
</g>
|
||||
<g
|
||||
id="g24"
|
||||
transform="translate(-227,-227)">
|
||||
</g>
|
||||
<g
|
||||
id="g26"
|
||||
transform="translate(-227,-227)">
|
||||
</g>
|
||||
<g
|
||||
id="g28"
|
||||
transform="translate(-227,-227)">
|
||||
</g>
|
||||
<g
|
||||
id="g30"
|
||||
transform="translate(-227,-227)">
|
||||
</g>
|
||||
<g
|
||||
id="g32"
|
||||
transform="translate(-227,-227)">
|
||||
</g>
|
||||
<g
|
||||
id="g34"
|
||||
transform="translate(-227,-227)">
|
||||
</g>
|
||||
<g
|
||||
id="g36"
|
||||
transform="translate(-227,-227)">
|
||||
</g>
|
||||
<g
|
||||
id="g38"
|
||||
transform="translate(-227,-227)">
|
||||
</g>
|
||||
<g
|
||||
id="g40"
|
||||
transform="translate(-227,-227)">
|
||||
</g>
|
||||
<g
|
||||
id="g42"
|
||||
transform="translate(-227,-227)">
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 3.0 KiB |
|
@ -15,19 +15,20 @@ class Controllers(object):
|
|||
self.paths = []
|
||||
|
||||
def button_add_action(self, event):
|
||||
path = app.get_file()
|
||||
if not path:
|
||||
return
|
||||
if path in self.paths:
|
||||
msg = _('Path previously added')
|
||||
app.msgbox(msg, self.TITLE)
|
||||
return
|
||||
path = app.paths.get_file()
|
||||
# ~ if not path:
|
||||
# ~ return
|
||||
# ~ if path in self.paths:
|
||||
# ~ msg = _('Path previously added')
|
||||
# ~ app.msgbox(msg, self.TITLE)
|
||||
# ~ return
|
||||
|
||||
self.paths.append(path)
|
||||
p, filename, n, e = app.get_info_path(path)
|
||||
self.d.grid.add_row((filename, '', path))
|
||||
self.d.grid.set_cell_tooltip(0, self.d.grid.rows-1, p)
|
||||
self.d.grid.sort(0)
|
||||
# ~ self.paths.append(path)
|
||||
# ~ p, filename, n, e = app.get_info_path(path)
|
||||
# ~ self.d.grid.add_row((filename, '', path))
|
||||
# ~ self.d.grid.set_cell_tooltip(0, self.d.grid.rows-1, p)
|
||||
# ~ self.d.grid.sort(0)
|
||||
app.debug(path)
|
||||
return
|
||||
|
||||
def button_save_action(self, event):
|
||||
|
@ -107,8 +108,36 @@ def _create_dialog():
|
|||
'Height': 160,
|
||||
}
|
||||
dlg = app.create_dialog(args)
|
||||
dlg.id = ID_EXTENSION
|
||||
dlg.events = Controllers
|
||||
|
||||
args = {
|
||||
'Type': 'Button',
|
||||
'Name': 'button_add',
|
||||
'Label': _('~Add'),
|
||||
'ImageURL': 'add.svg',
|
||||
'ImagePosition': 1,
|
||||
'Width': 60,
|
||||
'Height': 20,
|
||||
'Y': 5,
|
||||
}
|
||||
dlg.add_control(args)
|
||||
|
||||
args = {
|
||||
'Type': 'Button',
|
||||
'Name': 'button_save',
|
||||
'Label': _('~Save'),
|
||||
'ImageURL': 'save.svg',
|
||||
'ImagePosition': 1,
|
||||
'Width': 60,
|
||||
'Height': 20,
|
||||
}
|
||||
dlg.add_control(args)
|
||||
|
||||
dlg.button_add.center()
|
||||
dlg.button_save.move(dlg.button_add)
|
||||
dlg.button_save.center()
|
||||
|
||||
return dlg
|
||||
|
||||
@app.catch_exception
|
||||
|
@ -117,7 +146,6 @@ def run(args, path_locales):
|
|||
|
||||
_ = app.install_locales(path_locales)
|
||||
|
||||
app.debug(args)
|
||||
if args == 'config':
|
||||
_config()
|
||||
return
|
||||
|
|
Loading…
Reference in New Issue