From 2628105ea9e2967b1e1f0cd664488939d7ef1592 Mon Sep 17 00:00:00 2001 From: Taka Date: Fri, 29 Jul 2022 09:40:18 +1000 Subject: [PATCH] Minor UI tweaks. --- vasl_templates/about.py | 2 +- vasl_templates/main_window.py | 2 +- vasl_templates/ui/about.ui | 23 +++++++++--------- .../webapp/data/default-template-pack/ssr.j2 | 2 +- .../webapp/static/css/html-editor.css | 2 +- vasl_templates/webapp/static/css/main.css | 1 + .../webapp/static/css/program-info.css | 1 + .../webapp/static/css/scenario-card.css | 2 +- vasl_templates/webapp/static/css/sortable.css | 2 +- vasl_templates/webapp/static/css/tabs-ob.css | 1 + .../webapp/static/css/tabs-scenario.css | 2 +- .../static/images/menu/template-pack.png | Bin 726 -> 974 bytes vasl_templates/webapp/static/main.js | 7 ++++-- vasl_templates/webapp/static/snippets.js | 4 ++- .../templates/scenario-upload-dialog.html | 4 +-- .../webapp/templates/tabs-scenario.html | 4 +-- 16 files changed, 33 insertions(+), 26 deletions(-) diff --git a/vasl_templates/about.py b/vasl_templates/about.py index 2cc25c3..f746985 100644 --- a/vasl_templates/about.py +++ b/vasl_templates/about.py @@ -51,7 +51,7 @@ class AboutDialog( QDialog ): time.strftime( "%d %B %Y %H:%M", time.localtime( build_info["timestamp"] ) ) ) ) if "git_info" in build_info: - buf.write( " ({})".format( build_info["git_info"] ) ) + buf.write( " ({})".format( build_info["git_info"] ) ) buf.write( "." ) self.build_info.setText( buf.getvalue() ) else: diff --git a/vasl_templates/main_window.py b/vasl_templates/main_window.py index 2798202..033dca6 100644 --- a/vasl_templates/main_window.py +++ b/vasl_templates/main_window.py @@ -97,7 +97,7 @@ class MainWindow( QWidget ): # NOTE: This should be wide enough for the sortable hints to not wrap (so that # we don't see a scrollbar when their panels are reduced to their minimum height). # We also want the Trumbowyg button pane for the VC to wrap somewhere sensible. - self.setMinimumSize( 1030, 630 ) + self.setMinimumSize( 1030, 650 ) # initialize the layout layout = QVBoxLayout( self ) diff --git a/vasl_templates/ui/about.ui b/vasl_templates/ui/about.ui index d0da5b9..99610a8 100644 --- a/vasl_templates/ui/about.ui +++ b/vasl_templates/ui/about.ui @@ -10,7 +10,7 @@ 0 0 460 - 182 + 195 @@ -39,9 +39,9 @@ 80 - 20 + 19 361 - 61 + 58 @@ -75,7 +75,6 @@ DejaVu Sans - true @@ -88,9 +87,9 @@ - 15 - 140 - 430 + 19 + 152 + 425 31 @@ -129,9 +128,9 @@ - 15 - 120 - 411 + 80 + 122 + 361 21 @@ -151,9 +150,9 @@ - 15 + 80 100 - 411 + 361 17 diff --git a/vasl_templates/webapp/data/default-template-pack/ssr.j2 b/vasl_templates/webapp/data/default-template-pack/ssr.j2 index b58dfea..3ab0a00 100644 --- a/vasl_templates/webapp/data/default-template-pack/ssr.j2 +++ b/vasl_templates/webapp/data/default-template-pack/ssr.j2 @@ -4,7 +4,7 @@ diff --git a/vasl_templates/webapp/static/css/html-editor.css b/vasl_templates/webapp/static/css/html-editor.css index 834176d..ac9caeb 100644 --- a/vasl_templates/webapp/static/css/html-editor.css +++ b/vasl_templates/webapp/static/css/html-editor.css @@ -26,7 +26,7 @@ .trumbowyg-modal-box .trumbowyg-input-infos label { color: #444 ; font-weight: bold ; } /* configure button */ -.trumbowyg-foreColor-button { +.trumbowyg-foreColor-button, .trumbowyg-backColor-button { width: 40px !important ; background: no-repeat 12px 12px url("../images/trumbowyg/fore-color.png") !important ; background-size: 12px 12px !important ; diff --git a/vasl_templates/webapp/static/css/main.css b/vasl_templates/webapp/static/css/main.css index 5ea8fef..712f40f 100644 --- a/vasl_templates/webapp/static/css/main.css +++ b/vasl_templates/webapp/static/css/main.css @@ -60,6 +60,7 @@ input.snippet-width { width: 3.75em ; } .sp-palette-row-selection { margin-top: 6px ; border-top: 1px solid #ccc ; padding-top: 6px ; } /* growl notification balloons */ +#growls-br { bottom: 2px ; right: 3px ; } .growl-title { display: none ; } .growl-close { position: absolute ; top: 0 ; right: 5px ; } .growl .pre { font-family: monospace ; } diff --git a/vasl_templates/webapp/static/css/program-info.css b/vasl_templates/webapp/static/css/program-info.css index c9dcc80..b582506 100644 --- a/vasl_templates/webapp/static/css/program-info.css +++ b/vasl_templates/webapp/static/css/program-info.css @@ -8,6 +8,7 @@ #program-info .downloads td { padding-top: 0 ; padding-bottom: 0 ; } #program-info .downloads td.key { width: 12.5em ; } +#program-info .downloads td.key li { margin-top: -1px ; } #program-info .na { font-style: italic ; color: #444 ; } #program-info .path { font-family: monospace ; font-size: 80% ; } diff --git a/vasl_templates/webapp/static/css/scenario-card.css b/vasl_templates/webapp/static/css/scenario-card.css index 1ecb31c..b4a1461 100644 --- a/vasl_templates/webapp/static/css/scenario-card.css +++ b/vasl_templates/webapp/static/css/scenario-card.css @@ -82,7 +82,7 @@ #scenario-info-dialog .scenario-card { height: 100% ; overflow-y: hidden ; } #scenario-info-dialog .connect-roar { display: inline-block ; margin-top: 0.25em ; font-size: 80% ; color: #444 ; cursor: pointer ; } #scenario-info-dialog .connect-roar img { height: 0.75em ; Xmargin-right: 0.25em ; opacity: 0.7 ; } -#scenario-info-dialog .disconnect-roar img { height: 0.5em ; margin-left: 0.5em ; cursor: pointer ; } +#scenario-info-dialog .disconnect-roar img { height: 0.5em ; margin-left: 0.5em ; margin-bottom: 1px ; cursor: pointer ; } /* lightgallery */ .lg-backdrop.in { opacity: 0.85 ; } diff --git a/vasl_templates/webapp/static/css/sortable.css b/vasl_templates/webapp/static/css/sortable.css index 7e23018..1dc223d 100644 --- a/vasl_templates/webapp/static/css/sortable.css +++ b/vasl_templates/webapp/static/css/sortable.css @@ -5,7 +5,7 @@ img.sortable-reset { height: 16px ; margin: -2px 0.4em 0 -2px ; } .sortable { list-style-type: none ; margin: 0 ; padding: 0 ; } -.sortable > li { margin-bottom: 2px ; padding: 5px ; font-size: 90% ; } +.sortable > li { margin-bottom: 2px ; padding: 5px 8px ; font-size: 90% ; } .sortable > li:hover { cursor: pointer ; } .sortable > li.ui-sortable-helper { opacity: 0.8 ; } .sortable > li img.snippet { height: 1.25em ; margin: -2px -2px 0 15px ; float: right ; } diff --git a/vasl_templates/webapp/static/css/tabs-ob.css b/vasl_templates/webapp/static/css/tabs-ob.css index ebc7675..68ff700 100644 --- a/vasl_templates/webapp/static/css/tabs-ob.css +++ b/vasl_templates/webapp/static/css/tabs-ob.css @@ -14,6 +14,7 @@ .panel-ob_vehicles { height: 100% ; display: flex ; flex-direction: column ; } .panel-ob_vehicles .content { flex-grow: 1 ; } +.panel-ob_vehicles .sortable > li { padding: 4px 6px ; } .panel-ob_vehicles .footer { margin-top: 0.5em ; display: flex ; align-items: center ; } .panel-ob_ordnance { height: 100% ; display: flex ; flex-direction: column ; } diff --git a/vasl_templates/webapp/static/css/tabs-scenario.css b/vasl_templates/webapp/static/css/tabs-scenario.css index 4df7f1f..0a7c584 100644 --- a/vasl_templates/webapp/static/css/tabs-scenario.css +++ b/vasl_templates/webapp/static/css/tabs-scenario.css @@ -5,7 +5,7 @@ fieldset[name='scenario'] { min-height: 91px ; max-height: 265px ; overflow: hid #panel-scenario .row { display: flex ; align-items: center ; margin-bottom: 2px ; } #panel-scenario input { flex-grow: 1 ; } -#panel-scenario input[name='SCENARIO_ID'] { margin-left: 0.25em ; width: 80px ; flex-grow: 0 ; text-align: right ; } +#panel-scenario input[name='SCENARIO_ID'] { margin-left: 0.25em ; width: 70px ; flex-grow: 0 ; text-align: right ; } #panel-scenario .scenario-search { width: 25px ; height: 22px ; margin: 0 0 0 0.25em ; padding: 0 ; } #panel-scenario .scenario-search img { margin-top: 2px ; width: 16px ; } #panel-scenario input[name='SCENARIO_DATE'] { width: 6em ; flex-grow: 0 ; } diff --git a/vasl_templates/webapp/static/images/menu/template-pack.png b/vasl_templates/webapp/static/images/menu/template-pack.png index 3ba71fdb26b154ab04c90ff44f698fa5bba9818e..c748651a3a6a63c8d708f183715c90fafac82e55 100644 GIT binary patch delta 753 zcmVqFu5E>X;Zy3`R9`EPim*|t@qGDcuR#1@l6_waJ83>#U z`27W`Ox^(Kd)3@&IEOZ;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templates/webapp/static/main.js +++ b/vasl_templates/webapp/static/main.js @@ -774,11 +774,14 @@ function update_page_load_status( id ) ) ; $("#tabs").tabs({ disabled: [] }) ; $("#loader").fadeOut( 500 ) ; - adjust_footer_vspacers() ; // initialize the HTML WYSIWYG editors (nb: we do it here, since we need the app config // and template pack (for the player flags)) initVictoryConditionsTrumbowyg() ; - $( "#panel-vc .footer" ).fadeIn( 2*1000 ) ; + // FUDGE! There are problems with the layout jumping around during startup in the desktop app, + // so we hide the footers on the scenario tab (which is the one visible during startup), + // and only show them them when we're ready. + $( "#tabs-scenario .footer" ).fadeIn( 2*1000 ) ; + adjust_footer_vspacers() ; // FUDGE! This works around a timing problem during startup, where we unload the current parameters // before the Victory Conditions Trumbowyg control has initialized (and so doesn't get included). gLastSavedScenario = unload_params_for_save( false ) ; diff --git a/vasl_templates/webapp/static/snippets.js b/vasl_templates/webapp/static/snippets.js index da259c7..20da0e7 100644 --- a/vasl_templates/webapp/static/snippets.js +++ b/vasl_templates/webapp/static/snippets.js @@ -1626,7 +1626,9 @@ function edit_template( template_id ) open: function() { on_dialog_open( $(this) ) ; $(this).height( $(this).height() ) ; // fudge: force everything to resize - $("#edit-template textarea").change( on_template_change ) ; + var $elem = $( "#edit-template textarea" ) ; + $elem.change( on_template_change ) ; + $elem.scrollTop( 0 )[0].setSelectionRange( 0, 0 ) ; }, beforeClose: function() { gEditTemplateDlgState = getDialogState( $(this) ) ; diff --git a/vasl_templates/webapp/templates/scenario-upload-dialog.html b/vasl_templates/webapp/templates/scenario-upload-dialog.html index 4f1bb0b..2d1e8c5 100644 --- a/vasl_templates/webapp/templates/scenario-upload-dialog.html +++ b/vasl_templates/webapp/templates/scenario-upload-dialog.html @@ -24,7 +24,7 @@
- Click here to select your VASL save file, or drag it in. + Click here to select your VASL save file, or drag it in (optional).