From c31dae7c9abf2c8acaad358408835623566c9ece Mon Sep 17 00:00:00 2001 From: Pablo Gil Date: Tue, 4 Sep 2018 23:54:04 +0200 Subject: [PATCH] Start: 1) replaced link element before li item in order to make the whole box clickable 2) placed "New file" item as first one so that it is always at the same place no matter what session or recent files you have 3) created a thumbnail for "New file" item --- src/Mod/Start/StartPage/StartPage.py | 23 +- .../StartPage/images/new_file_thumbnail.svg | 235 ++++++++++++++++++ 2 files changed, 246 insertions(+), 12 deletions(-) create mode 100644 src/Mod/Start/StartPage/images/new_file_thumbnail.svg diff --git a/src/Mod/Start/StartPage/StartPage.py b/src/Mod/Start/StartPage/StartPage.py index 47219ebca5..79d1ab3c25 100644 --- a/src/Mod/Start/StartPage/StartPage.py +++ b/src/Mod/Start/StartPage/StartPage.py @@ -71,7 +71,7 @@ def getInfo(filename): "returns available file information" global iconbank,tempfolder - + tformat = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/Start").GetString("TimeFormat","%m/%d/%Y %H:%M:%S") def getLocalTime(timestamp): @@ -89,7 +89,7 @@ def getInfo(filename): return hsize if os.path.exists(filename): - + if os.path.isdir(filename): return None @@ -156,7 +156,7 @@ def getInfo(filename): def buildCard(filename,method,arg=None): - + "builds a html
  • element representing a file. method is a script + a keyword, for ex. url.py?key=" result = "" @@ -174,16 +174,16 @@ def buildCard(filename,method,arg=None): if finfo[5]: infostring += "\n\n" + finfo[5] if size: - result += '
  • ' result += '' + result += '
  • ' result += '' result += '
    ' result += '

    '+basename+'

    ' result += '

    '+size+'

    ' result += '

    '+author+'

    ' result += '
    ' - result += '
    ' result += '
  • ' + result += '' return result @@ -302,17 +302,17 @@ def handle(): if rfcount: SECTION_RECENTFILES = "

    "+TranslationTexts.T_RECENTFILES+"

    " SECTION_RECENTFILES += "' if sys.version_info.major < 3: SECTION_RECENTFILES = SECTION_RECENTFILES.decode("utf8") @@ -392,7 +392,7 @@ def handle(): UL_WORKBENCHES += '' UL_WORKBENCHES += '' HTML = HTML.replace("UL_WORKBENCHES",UL_WORKBENCHES) - + # Detect additional addons that are not a workbench try: @@ -521,4 +521,3 @@ def checkPostOpenStartPage(): if len(sys.argv) > 1: postStart() Start.CanOpenStartPage = True - diff --git a/src/Mod/Start/StartPage/images/new_file_thumbnail.svg b/src/Mod/Start/StartPage/images/new_file_thumbnail.svg new file mode 100644 index 0000000000..d5250e9658 --- /dev/null +++ b/src/Mod/Start/StartPage/images/new_file_thumbnail.svg @@ -0,0 +1,235 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + New Document + + + Jakub Steiner + + + http://jimmac.musichall.cz + + + + + + + + + + + + + + + + + + +