From c025d71655ece264a647624599c958fc3bb19330 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonio=20Ca=C3=B1as=20Vargas?= Date: Mon, 28 Mar 2016 19:30:37 +0200 Subject: [PATCH] Version 15.165 --- css/{swad15.162.1.css => swad15.165.css} | 15 ++- swad_centre.c | 137 +++++++++++++++++------ swad_changelog.h | 8 +- swad_file.c | 6 +- swad_file.h | 3 + swad_file_browser.c | 22 ++-- swad_info.c | 17 ++- swad_photo.c | 20 ++-- swad_string.c | 21 +++- swad_string.h | 2 +- swad_test_import.c | 19 ++-- swad_text.c | 114 ++++++++++++++----- 12 files changed, 269 insertions(+), 115 deletions(-) rename css/{swad15.162.1.css => swad15.165.css} (99%) diff --git a/css/swad15.162.1.css b/css/swad15.165.css similarity index 99% rename from css/swad15.162.1.css rename to css/swad15.165.css index 675d820e3..422b85465 100644 --- a/css/swad15.162.1.css +++ b/css/swad15.165.css @@ -1416,8 +1416,7 @@ a:hover /* Default ==> underlined */ { box-sizing:border-box; width:480px; - height:320px; - padding:6px; margin:10px; + padding:6px; margin:9px; border:solid 1px #EEE; } a:hover img.CENTRE_PHOTO_SHOW @@ -1428,18 +1427,22 @@ a:hover img.CENTRE_PHOTO_SHOW .CENTRE_PHOTO_PRINT { box-sizing:border-box; - width:720px; - height:480px; - padding:15px; margin:18px; + width:768px; + padding:10px; margin:15px; border:solid 1px #EEE; box-shadow:1px 1px 6px #999; } /**************** Attribution (author and license) of images *****************/ +#AttributionArea + { + box-sizing:border-box; + width:480px; + } .ATTRIBUTION { box-sizing:border-box; - max-width:500px; + margin-bottom:15px; color:#A0A0A0; font-size:8pt; text-align:center; diff --git a/swad_centre.c b/swad_centre.c index 5c3d289e0..169213da4 100644 --- a/swad_centre.c +++ b/swad_centre.c @@ -29,6 +29,7 @@ #include // For boolean type #include // For calloc #include // For string functions +#include // For unlink #include "swad_centre.h" #include "swad_constant.h" @@ -52,10 +53,14 @@ extern struct Globals Gbl; /***************************** Private constants *****************************/ /*****************************************************************************/ -// Centre photo must be stored in Ctr_PHOTO_REAL_WIDTH x Ctr_PHOTO_REAL_HEIGHT -// Aspect ratio: 3:2 (1.5) -#define Ctr_PHOTO_REAL_WIDTH 768 -#define Ctr_PHOTO_REAL_HEIGHT 512 +// Centre photo will be saved with: +// - maximum width of Ctr_PHOTO_SAVED_MAX_HEIGHT +// - maximum height of Ctr_PHOTO_SAVED_MAX_HEIGHT +// - maintaining the original aspect ratio (aspect ratio recommended: 3:2) +#define Ctr_RECOMMENDED_ASPECT_RATIO "3:2" +#define Ctr_PHOTO_SAVED_MAX_WIDTH 768 +#define Ctr_PHOTO_SAVED_MAX_HEIGHT 512 +#define Ctr_PHOTO_SAVED_QUALITY 75 // 1 to 100 /*****************************************************************************/ /******************************* Private types *******************************/ @@ -339,7 +344,8 @@ static void Ctr_Configuration (bool PrintView) { fprintf (Gbl.F.Out,"
"); Act_FormStart (ActChgCtrPhoAtt); - fprintf (Gbl.F.Out,"