Group Abstract Group Abstract

Message Boards Message Boards

0
|
8.1K Views
|
10 Replies
|
5 Total Likes
View groups...
Share
Share this post:

Showing countdown output in fullscreen?

Posted 3 years ago
POSTED BY: Steven White
10 Replies
Posted 3 years ago
Attachment

Attachments:
POSTED BY: Steven White
Posted 3 years ago

Updated so it's using an image from the Pi itself to see if I could that got rid of the white boarder on the right, but still doesn't fill the screen.

Also looking to change the colour to something bolder. For this would i just need to add the code Style[1/Sqrt[2], FontColor -> Red]

into the existing code?

POSTED BY: Steven White

Steven,

my first guess was that your system does not know MixedUnit - so I tried to improve the code without this command. But anyway. Here is a somewhat nicer version:

textSize = 140;
textColor = Red;
imageSize = Full; img = 
 Import["https://images.freeimages.com/images/large-previews/13d/xmas-decoration-1360454.jpg", ImageSize -> imageSize];
CreateDocument[
  Dynamic@Overlay[{img,
     secs = 
      Round@QuantityMagnitude[
        DateDifference[Now, {2021, 12, 25, 8}, {"Seconds"}]]; 
     days = IntegerPart[secs/86400]; secs -= days 86400; 
     hours = IntegerPart[secs/3600];
     secs -= hours 3600;
     mins = IntegerPart[secs/60];
     secs -= mins 60;
     Style[
      TextGrid[{{days, "d"}, {hours, "h"}, {mins, "m"}, {secs, "s"}}, 
       Frame -> None], textColor, textSize]},
    Alignment -> Center], WindowSize -> Full, 
  WindowTitle -> "Time left until Xmas 2021"];

enter image description here

POSTED BY: Henrik Schachner

Nice bit of code, and thanks for all the code that you put up here. (This one I actually can understand.)

For the WindowTitle, does that show up for you in Full Screen Mode? I does not show up for me on Rasp Pi and 12.1 or 12.2

Docked cells do show in Full Screen Mode, as do cell brackets, both scroll bars and even Ruler and Toolbar. Is this behavior for "Full Screen" the same as other platforms, or am I doing something wrong?

POSTED BY: Warren Jokinen

Hi Warren,

I do observe exactly the same behavior you are describing. My system:

12.3.1 for Linux x86 (64-bit) (June 24, 2021)

So, you are not doing anything wrong! And I do not know how to expand the image to fill the entire screen, unfortunately. Anyone?

Regards -- Henrik

POSTED BY: Henrik Schachner
Posted 3 years ago

Found the issue, there was a missing "," its working now

POSTED BY: Steven White
Posted 3 years ago

Clicking on the little orange "+" I get the following messages.

  • Thread: Objects of unequal length in (2021, 12, 25, 6) {Seconds} Cannot be combined
  • DateDifference: Expression {Seconds} (2021, 12, 25,6) cannot be interpreted as a date specification.

Version Wise - It says I'm running "Mathematica 12 for Raspberry Pi, Version 12.2.0.0"

POSTED BY: Steven White
Posted 3 years ago
POSTED BY: Ahmed Elbanna

Steven,

this is a nice idea! Here comes a simple approach as a first guess. (Use F12 to leave full screen mode.)

textSize = 140;       (* to be adjusted *)
imageSize = Full;  (* to be adjusted *)
img = 
 Import["https://images.freeimages.com/images/large-previews/13d/xmas-decoration-1360454.jpg", ImageSize -> imageSize];  
CreateDocument[
  Overlay[{img, 
    Style[Dynamic[
      UnitConvert[
       Round@DateDifference[Now, {2021, 12, 25, 8}, {"Seconds"}], 
       MixedUnit[{"Days", "Hours", "Minutes", "Seconds"}]], 
      UpdateInterval -> 1], textSize]}, Alignment -> Center],
  WindowSize -> Full, WindowTitle -> "Time left until Xmas 2021"];

enter image description here

POSTED BY: Henrik Schachner
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard