Skip to content

Commit

Permalink
Merge pull request #307 from mfs12/301-display-baby-stepping-option-a…
Browse files Browse the repository at this point in the history
…t-all-times-2

UI: in status tab show resume and cancel button when print is paused
  • Loading branch information
mfs12 committed May 26, 2023
2 parents d1360d5 + 928561b commit ec35ade
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
16 changes: 8 additions & 8 deletions src/UI/UserInterface.cpp
Expand Up @@ -987,6 +987,10 @@ static void CreatePrintingTabFields(const ColourScheme& colours)
babystepButton = new TextButton(row7, babystepColumn, stateColumnWdith - fieldSpacing, strings->babystep, evBabyStepPopup);
mgr.AddField(babystepButton);

DisplayField::SetDefaultColours(colours.buttonTextColour, colours.resetButtonBackColour);
cancelButton = new TextButton(row7, cancelColumn, stateColumnWdith - fieldSpacing, strings->cancel, evReset, "M0");
mgr.AddField(cancelButton);

DisplayField::SetDefaultColours(colours.buttonTextColour, colours.pauseButtonBackColour);
pauseButton = new TextButton(row7, pauseColumn, stateColumnWdith - (2 * margin), strings->pause, evPausePrint, "M25");
mgr.AddField(pauseButton);
Expand All @@ -995,10 +999,6 @@ static void CreatePrintingTabFields(const ColourScheme& colours)
resumeButton = new TextButton(row7, resumeColumn, stateColumnWdith - (2 * margin), strings->resume, evResumePrint, "M24");
mgr.AddField(resumeButton);

DisplayField::SetDefaultColours(colours.buttonTextColour, colours.resetButtonBackColour);
cancelButton = new TextButton(row7, cancelColumn, stateColumnWdith - (2 * margin), strings->cancel, evReset, "M0");
mgr.AddField(cancelButton);

#if DISPLAY_X == 800
// On 5" and 7" screens there is room to show the current position on the Print page
const PixelNumber offset = rowHeight - 20;
Expand Down Expand Up @@ -1241,8 +1241,8 @@ namespace UI
mgr.Show(cancelButton, false);
mgr.Show(pauseButton, false);
mgr.Show(printProgressBar, false);
mgr.Show(babystepButton, true);

mgr.Show(babystepButton, true);
mgr.Show(reprintButton, lastJobFileNameAvailable);
mgr.Show(filesButton, true);
}
Expand All @@ -1267,13 +1267,13 @@ namespace UI
{
// First hide everything removed then show everything new
// otherwise remnants of the to-be-hidden might remain
mgr.Show(pauseButton, false);
mgr.Show(filesButton, false);
mgr.Show(pauseButton, false);
mgr.Show(reprintButton, false);
mgr.Show(babystepButton, false);

mgr.Show(babystepButton, true);
mgr.Show(resumeButton, true);
mgr.Show(cancelButton, true);
mgr.Show(resumeButton, true);
mgr.Show(printProgressBar, true);
}

Expand Down
2 changes: 1 addition & 1 deletion src/UI/UserInterfaceConstants.hpp
Expand Up @@ -143,7 +143,7 @@ const PixelNumber stateColumnWdith = DISPLAY_X / 4;
const PixelNumber speedColumn = margin;
const PixelNumber fanColumn = margin + stateColumnWdith;
const PixelNumber babystepColumn = margin + stateColumnWdith * 2;
const PixelNumber cancelColumn = margin + stateColumnWdith * 3;
const PixelNumber cancelColumn = margin + stateColumnWdith * 2;
const PixelNumber resumeColumn = margin + stateColumnWdith * 3;
const PixelNumber pauseColumn = margin + stateColumnWdith * 3;

Expand Down

0 comments on commit ec35ade

Please sign in to comment.