Skip to content

Commit

Permalink
display shorter filename
Browse files Browse the repository at this point in the history
  • Loading branch information
Nigh committed Sep 27, 2023
1 parent 0d2928b commit 4c40537
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions app.ahk
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ mygui.SetFont("s" DPIScaledFont(10) " Q5 norm", "Comic Sans MS")
mygui.Add("Text", "Section xs y+0 h" DPIScaled(12), 'Current:')
mygui.Add("Text", "xs y+0 hp wp", 'EXIF:')

txt_indicator := mygui.Add("Text", debugBorder "x+10 ys hp w" DPIScaled(360), 'NULL')
txt_indicator := mygui.Add("Text", debugBorder "Section x+10 ys hp w" DPIScaled(270), 'NULL')
txt_indicator.SetFont("cTeal bold")

txt_exif := mygui.Add("Text", debugBorder "xp y+0 hp w" DPIScaled(360), 'NULL')
Expand Down Expand Up @@ -139,6 +139,14 @@ if (setting_runbackgroud) {
}
Return

shortFilename(name) {
if (StrLen(name) > 20) {
return SubStr(name, 1, 6) "..." SubStr(name, -9)
}
return name
}


copyCompare(GuiCtrlObj, info*) {
global mygui
A_Clipboard := ""
Expand Down Expand Up @@ -283,8 +291,7 @@ pic_ctrl_set_size() {

mygui_ctrl_show_pic(picture)
{
global txt_indicator, pic, mygui
txt_indicator.Text := picture.name
txt_indicator.Text := shortFilename(picture.name)
txt_exif.Text := picture.exif
SetImage(pic.hwnd, picture.hBitmapShow)
}
Expand Down

0 comments on commit 4c40537

Please sign in to comment.