Commit graph

35 commits

Author SHA1 Message Date
Hans Unzner
16080cd8a6 gmoccapy: Fix window size by reducing button padding with CSS 2022-01-31 18:22:42 +01:00
Hans Unzner
360d8c67a3 also for gmoccapy with yellow active-backgound
references:
https://shallowsky.com/blog/programming/styling-gtk3-with-css-python.html
https://docs.gtk.org/gtk3/css-overview.html
https://docs.gtk.org/gtk3/css-properties.html
2022-01-31 18:15:53 +01:00
Hans Unzner
ec1898b1a4 apply css to all elements 2022-01-31 16:35:57 +01:00
Hans Unzner
7854de2cdb apply css style manually to buttons 2022-01-31 16:29:16 +01:00
Hans Unzner
921c36321d calculatorwidget: Make glade file translatable, changed images from stock items (deprecated) to icons 2022-01-06 16:49:42 +01:00
Hans Unzner
ef13ff4406 calculatorwidget: replaced deprecated items 2022-01-06 16:49:42 +01:00
Hans Unzner
fc49b8d3ad calculatorwidget: placed up/down buttons inside the table to the right 2022-01-06 16:49:15 +01:00
Hans Unzner
4c8c083190 calculatorwidget: optimize table with num_pad_only 2022-01-02 18:19:19 +01:00
Hans Unzner
d3b6918cde calculatorwidget: fixed num_pad_only in some cases 2022-01-02 02:34:17 +01:00
Hans Unzner
116cbd1d10 calculatorwidget: fixed sizing of OK/Cancel button due to GTK3, new layout 2021-12-25 17:39:21 +01:00
0c8a0058bf use python3 in all #!python lines 2021-09-02 18:32:58 -05:00
Rene Hopf
28b27e65e3 Merge branch 'master' into master-gtk3 2021-05-23 02:19:18 +02:00
Rene Hopf
5124578e8c calculator: fix gtk warnings 2021-05-23 01:27:52 +02:00
Rene Hopf
dd95e08979 gtk3 wip 2021-05-23 00:51:14 +02:00
c-morley
e41b0d43fd
Merge pull request #1029 from hansu/change-calc-buttonsize
calculator.glade: increased button size for touchscreens
2021-05-13 05:45:42 -07:00
Hans Unzner
082010ae3e calculator widget: removed two debug messages 2021-05-13 14:40:38 +02:00
Hans Unzner
450dabe191 calculator wigdet: clear text area on new calculation 2021-03-31 08:47:13 +02:00
Hans Unzner
deb5bc8a0a calculator widget: added Calculations for Inch <--> mm, added backspace button 2021-03-30 20:19:47 +02:00
Hans Unzner
881a0dd482 calculator widget: fixed two errors belonging to locale options
with locale=de_DE:
- entering for exampe (1,5) results in an error
- pressing the "="-button multiple times when an number with a comma is displayed results in multipliying the result by 10
2021-03-30 20:19:47 +02:00
luz paz
ea08a53edd docs: fix source comment and doc typos in lib/python
Found via `codespell v2.0.dev`  
```
codespell -q 3  -L ans,doubleclick,halp,parms
```
2021-01-04 09:53:06 -05:00
Rene Hopf
458a345644 calculatorwidget.py: python3 compatibility 2020-04-26 23:00:57 +02:00
Norbert Schechner
2f97820101 gladevcp - calculator widget - delete text if selected
- Added a code to delete the selected text if a new value is entered with
  the popup keyboard. Prior to this change the new value was added to the
  displayed text. That was an other behavior as known from the
  normal OS behavior.

Signed-off-by: Norbert Schechner <nieson@web.de>
2019-08-04 01:15:41 +02:00
Norbert Schechner
14de1b292f gladevcp - calculator_widget support locale
made the calc widget support locale settings,
so users can use there num pad of the keyboard,
no matter if they use a comma or a dot as decimal separator.
2014-01-26 18:51:58 +01:00
Chris Morley
0e42347162 gladevcp -have the calculator show only integers when switch is on
When using the calculator as a numerical entry sometimes we onnly want
integers - such as when using it for run-from-line entry.
We already had an integer_entry_only method to hide the decimal
button, now it also makes the display only show integers.
2013-09-05 21:38:33 -07:00
Chris Morley
47d5cf0137 gladevcp -add a method to hide decimal button
sometimes only integer entry is wanted.
2013-09-02 15:21:09 -07:00
Chris Morley
0baa785bda gladevcp -calculator widget: replace tabs with spaces
no other changes intended. for my sanity.
2013-06-09 09:59:08 -07:00
Chris Morley
0af75dba60 gladevcp fix calculator widget math error
numbers starting with a 0 such as 0123+1 would be
converted to octal instead of decimal (so above = 84)
also dividing a whole number into a faction would not
show the decimal portion (1/2 would not = .5)
now we split the string up and qualify all the parts.
converting the numbers to floats first. Then we put it back
together and eval() it.

This bug affected Gscreen's run-from-line badly and certain
division calculations as above.
2013-06-09 09:43:17 -07:00
Chris Morley
2c4ffc6a26 gladevcp -calculator add some options
num_pad_only makes calulator into a numerical input only.
added global references foe the entry and calc_box, so users can
connect signals or add widgets
2013-03-02 22:10:23 -08:00
Chris Morley
8a62acf8a2 gladevcp -pass on the fact there was an error
If there was an error and you ask for the value send None instead of 0
Also if 'Error' is on screen the next key press should clear the error.
hey now it does!
2013-01-30 20:30:19 -08:00
Chris Morley
75ddaf4f63 gladevcp -fix integer division error in calculator widget
normally in python dividing two integers returns an integer
which gives BIG trunucation errors. eg 1/2 = 0
This fixes the problem.
2013-01-13 20:19:06 -08:00
Chris Morley
c710014fc8 gladevcp -fix error with calculator widget
When using the calculator widget standalone I got errors.
This fixed it.
2013-01-01 16:18:30 -08:00
Chris Morley
d65adbdb27 gladevcp -add font and editability options to calculator
you can change the display font with pango fonts.
you can make the text entry editable with a keyboard
2012-06-25 00:27:33 -07:00
Chris Morley
a159c55c98 gladvcp -allow font changes on calculator widget display
pango fonts
2012-06-24 22:06:44 -07:00
Chris Morley
be20ed276b gladevcp -fix error when presetting display
variable name collided with method name
2012-06-24 21:00:00 -07:00
Chris Morley
bb8d9721d9 gladevcp -add calculator widget code
calculator widget does simple calculations and the result
cann be returned for further uses.
It was meant as data entry on a touch screen
2012-06-24 20:53:19 -07:00