Changeset 1176137 in sasview for src/sas/sascalc/fit/pagestate.py


Ignore:
Timestamp:
Apr 17, 2018 9:29:25 AM (6 years ago)
Author:
GitHub <noreply@…>
Branches:
master, magnetic_scatt, release-4.2.2, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, unittest-saveload
Children:
666454e, 1cf490b6, cd10013, c192960
Parents:
94f074c4 (diff), 91552b5 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
git-author:
Paul Butler <butlerpd@…> (04/17/18 09:29:25)
git-committer:
GitHub <noreply@…> (04/17/18 09:29:25)
Message:

Merge pull request #149 from SasView?/ticket-1079

Removing save button from OSX

closes #1079

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/sas/sascalc/fit/pagestate.py

    r9e6aeaf r3b070a0  
    646646                    name = value.split(':', 1)[1].strip() 
    647647                    file_value = "File name:" + name 
     648                    #Truncating string so print doesn't complain of being outside margins 
     649                    if sys.platform != "win32": 
     650                        MAX_STRING_LENGHT = 50 
     651                        if len(file_value) > MAX_STRING_LENGHT: 
     652                            file_value = "File name:.."+file_value[-MAX_STRING_LENGHT+10:] 
    648653                    file_name = CENTRE % file_value 
    649654                    if len(title) == 0: 
     
    721726        html_str, text_str, title = self._get_report_string() 
    722727        # Allow 2 figures to append 
    723         image_links = [FEET_2%fig for fig in fig_urls] 
    724  
     728        #Constraining image width for OSX and linux, so print doesn't complain of being outside margins 
     729        if sys.platform == "win32": 
     730            image_links = [FEET_2%fig for fig in fig_urls] 
     731        else: 
     732            image_links = [FEET_2_unix%fig for fig in fig_urls] 
    725733        # final report html strings 
    726734        report_str = html_str + ELINE.join(image_links) 
    727  
     735        report_str += FEET_3 
    728736        return report_str, text_str 
    729737 
     
    13681376""" 
    13691377FEET_2 = \ 
    1370 """<img src="%s" ></img> 
     1378"""<img src="%s"></img> 
     1379""" 
     1380FEET_2_unix = \ 
     1381"""<img src="%s" width="540"></img> 
    13711382""" 
    13721383FEET_3 = \ 
Note: See TracChangeset for help on using the changeset viewer.