Skip to content

Commit

Permalink
true svg icons sizes.
Browse files Browse the repository at this point in the history
  • Loading branch information
schwarzlichtbezirk committed Oct 31, 2022
1 parent 3cabe35 commit 3a433cf
Show file tree
Hide file tree
Showing 27 changed files with 223 additions and 222 deletions.
18 changes: 9 additions & 9 deletions exifprop.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,14 @@ type ExifProp struct {
thumb MediaData
}

func ratfloat32(t *tiff.Tag) float32 {
func RatFloat32(t *tiff.Tag) float32 {
if numer, denom, _ := t.Rat2(0); denom != 0 {
return float32(numer) / float32(denom)
}
return 0
}

func ratfloat64(t *tiff.Tag) float64 {
func RatFloat64(t *tiff.Tag) float64 {
if numer, denom, _ := t.Rat2(0); denom != 0 {
return float64(numer) / float64(denom)
}
Expand Down Expand Up @@ -92,31 +92,31 @@ func (ep *ExifProp) Setup(x *exif.Exif) {
ep.ExposureProg, _ = t.Int(0)
}
if t, err = x.Get(exif.FNumber); err == nil {
ep.FNumber = ratfloat32(t)
ep.FNumber = RatFloat32(t)
}
if t, err = x.Get(exif.ISOSpeedRatings); err == nil {
ep.ISOSpeed, _ = t.Int(0)
}
if t, err = x.Get(exif.ShutterSpeedValue); err == nil {
ep.ShutterSpeed = ratfloat32(t)
ep.ShutterSpeed = RatFloat32(t)
}
if t, err = x.Get(exif.ApertureValue); err == nil {
ep.Aperture = ratfloat32(t)
ep.Aperture = RatFloat32(t)
}
if t, err = x.Get(exif.ExposureBiasValue); err == nil {
ep.ExposureBias = ratfloat32(t)
ep.ExposureBias = RatFloat32(t)
}
if t, err = x.Get(exif.LightSource); err == nil {
ep.LightSource, _ = t.Int(0)
}
if t, err = x.Get(exif.FocalLength); err == nil {
ep.Focal = ratfloat32(t)
ep.Focal = RatFloat32(t)
}
if t, err = x.Get(exif.FocalLengthIn35mmFilm); err == nil {
ep.Focal35mm, _ = t.Int(0)
}
if t, err = x.Get(exif.DigitalZoomRatio); err == nil {
ep.DigitalZoom = ratfloat32(t)
ep.DigitalZoom = RatFloat32(t)
}
if t, err = x.Get(exif.ImageLength); err == nil {
ep.Height, _ = t.Int(0)
Expand All @@ -134,7 +134,7 @@ func (ep *ExifProp) Setup(x *exif.Exif) {
ep.Latitude, ep.Longitude = lat, lon
}
if t, err = x.Get(exif.GPSAltitude); err == nil {
ep.Altitude = ratfloat32(t)
ep.Altitude = RatFloat32(t)
if t, err = x.Get(exif.GPSAltitudeRef); err == nil {
var ref, _ = t.Int(0)
if ref == 1 {
Expand Down
33 changes: 14 additions & 19 deletions folder.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,43 +20,38 @@ var puidsym = (func() (t [256]bool) {

// UnfoldPath brings any share path to system file path.
func UnfoldPath(shrpath string) (syspath string, err error) {
var pref, suff = shrpath, "."
for i, c := range shrpath {
if c == '/' || c == '\\' {
var puid Puid_t
if err = puid.Set(shrpath[:i]); err != nil {
return
}
if puid < PUIDreserved {
err = ErrNotSys
return
}
var suff = path.Clean(shrpath[i+1:])
pref, suff = shrpath[:i], path.Clean(shrpath[i+1:])
if !fs.ValidPath(suff) { // prevent to modify original path
err = ErrPathOut
return
}
var pref string
var ok bool
if pref, ok = syspathcache.Path(puid); !ok {
err = ErrNoPath
return
}
syspath = path.Join(pref, suff)
return
break
} else if int(c) >= len(puidsym) || !puidsym[c] {
syspath, err = shrpath, fs.ErrPermission
return
}
}
var puid Puid_t
if err = puid.Set(shrpath); err != nil {
if err = puid.Set(pref); err != nil {
return
}
var ok bool
if syspath, ok = syspathcache.Path(puid); !ok {
if pref, ok = syspathcache.Path(puid); !ok {
err = ErrNoPath
return
}
if suff != "." {
if puid < PUIDreserved {
err = ErrNotSys
return
}
syspath = path.Join(pref, suff)
} else {
syspath = pref
}
return // root of share
}

Expand Down
72 changes: 36 additions & 36 deletions frontend/devmode/cards.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,28 +14,28 @@ const sortmodehint = {
};

const listmodetag = {
lsicon: 'list-item-tag',
smicon: 'file-item-tag',
mdicon: 'file-item-tag',
lgicon: 'img-item-tag'
xs: 'list-item-tag',
sm: 'file-item-tag',
md: 'file-item-tag',
lg: 'img-item-tag'
};
const listmoderow = {
lsicon: 'align-items-start',
smicon: 'align-items-start',
mdicon: 'align-items-start',
lgicon: 'align-items-center'
xs: 'align-items-start',
sm: 'align-items-start',
md: 'align-items-start',
lg: 'align-items-center'
};
const listmodeicon = {
lsicon: 'format_align_justify',
smicon: 'view_comfy',
mdicon: 'view_module',
lgicon: 'widgets'
xs: 'format_align_justify',
sm: 'view_comfy',
md: 'view_module',
lg: 'widgets'
};
const listmodehint = {
lsicon: "list",
smicon: "small icons",
mdicon: "middle icons",
lgicon: "large icons"
xs: "list",
sm: "small icons",
md: "middle icons",
lg: "large icons"
};

const noderadius = 15;
Expand Down Expand Up @@ -186,7 +186,7 @@ const VueCtgrCard = {
props: ["flist"],
data() {
return {
listmode: "smicon",
listmode: 'sm',
iid: makestrid(10) // instance ID
};
},
Expand Down Expand Up @@ -225,16 +225,16 @@ const VueCtgrCard = {
},
methods: {
onlistmodels() {
this.listmode = 'lsicon';
this.listmode = 'xs';
},
onlistmodesm() {
this.listmode = 'smicon';
this.listmode = 'sm';
},
onlistmodemd() {
this.listmode = 'mdicon';
this.listmode = 'md';
},
onlistmodelg() {
this.listmode = 'lgicon';
this.listmode = 'lg';
},

onselect(file) {
Expand Down Expand Up @@ -279,7 +279,7 @@ const VueDriveCard = {
diskadd: null,

sortorder: 1,
listmode: "smicon",
listmode: 'sm',
iid: makestrid(10) // instance ID
};
},
Expand Down Expand Up @@ -350,16 +350,16 @@ const VueDriveCard = {
this.sortorder = -this.sortorder;
},
onlistmodels() {
this.listmode = 'lsicon';
this.listmode = 'xs';
},
onlistmodesm() {
this.listmode = 'smicon';
this.listmode = 'sm';
},
onlistmodemd() {
this.listmode = 'mdicon';
this.listmode = 'md';
},
onlistmodelg() {
this.listmode = 'lgicon';
this.listmode = 'lg';
},

ondiskadd() {
Expand Down Expand Up @@ -501,7 +501,7 @@ const VueDirCard = {
data() {
return {
sortorder: 1,
listmode: "smicon",
listmode: 'sm',
iid: makestrid(10) // instance ID
};
},
Expand Down Expand Up @@ -555,16 +555,16 @@ const VueDirCard = {
this.sortorder = -this.sortorder;
},
onlistmodels() {
this.listmode = 'lsicon';
this.listmode = 'xs';
},
onlistmodesm() {
this.listmode = 'smicon';
this.listmode = 'sm';
},
onlistmodemd() {
this.listmode = 'mdicon';
this.listmode = 'md';
},
onlistmodelg() {
this.listmode = 'lgicon';
this.listmode = 'lg';
},

onselect(file) {
Expand Down Expand Up @@ -606,7 +606,7 @@ const VueFileCard = {
expanded: true,
sortorder: 1,
sortmode: 'byalpha',
listmode: 'smicon',
listmode: 'sm',
thumbmode: true,
fgshow: [
false, // other
Expand Down Expand Up @@ -885,16 +885,16 @@ const VueFileCard = {
this.sortmode = 'unsorted';
},
onlistmodels() {
this.listmode = 'lsicon';
this.listmode = 'xs';
},
onlistmodesm() {
this.listmode = 'smicon';
this.listmode = 'sm';
},
onlistmodemd() {
this.listmode = 'mdicon';
this.listmode = 'md';
},
onlistmodelg() {
this.listmode = 'lgicon';
this.listmode = 'lg';
},
onthumbmode() {
this.thumbmode = thumbmode = !this.thumbmode;
Expand Down
2 changes: 1 addition & 1 deletion frontend/devmode/devmode.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// This file is included only for developer mode linkage

const buildvers = "0.8.3";
const builddate = "2022.10.25";
const builddate = "2022.10.31";
console.info("version: %s, builton: %s", buildvers, builddate);
console.info("starts in developer mode");

Expand Down
Loading

0 comments on commit 3a433cf

Please sign in to comment.