Skip to content

Instantly share code, notes, and snippets.

@PeterWAWood
Last active September 15, 2017 07:18
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save PeterWAWood/6cca1a238f16429848a3e35f0f49b52a to your computer and use it in GitHub Desktop.
Save PeterWAWood/6cca1a238f16429848a3e35f0f49b52a to your computer and use it in GitHub Desktop.
A test of Red's native look and feel
Red[
Title: "Calculator"
Author: "Peter W A Wood"
File: %calculator.red
Purpose: "A mac-like calculator to test native look and feel"
Tabs: 4
Rights: "Copyright (C) 2017 Peter W A Wood. All rights reserved."
License: {
Distributed under the Boost Software License, Version 1.0.
See https://github.com/red/red/blob/master/BSL-License.txt
}
needs: View
]
view [
title ""
size 231x298
backdrop 230.230.230.192
space 1x1
origin 0x0
style square-button: base 57x47 font-name "Verdana" font-size 18
style grey-button: square-button 230.230.230.0
style orange-button: square-button 245.146.62 font-color white
across
text "0" right 230x57 font-name "Verdana" font-size 24 font-color white
return
grey-button "AC"
grey-button "+/-"
grey-button "%"
orange-button "÷"
return
grey-button "7"
grey-button "8"
grey-button "9"
orange-button "x"
return
grey-button "4"
grey-button "5"
grey-button "6"
orange-button "-"
return
grey-button "1"
grey-button "2"
grey-button "3"
orange-button "+"
return
pad -57x0 grey-button "0" 172x52
grey-button "." 57x52
orange-button "=" 57x52
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment