Utilities
Utilities copied to clipboard
Update Calculator.app
Fix for #186
Thanks @Hierosme. Can we put the = button in the lower left spot of the grid? Right now it is "in between" which doesn't look orderly.
Also, I think we should try to minimize the width of the window; if we can use a smaller font for the M... buttons we might be able to do something like this:
But as far as I remember, the theme is currently hardcoding the font size for buttons, so I need to change that in QtPlugin first.
Normally button should not be use like that, i certainly migrate to a True custum widget for get the True OsX layout.
Yes the "=" half position is due to the Theme where horizontal scale is allow but the vertical scale force a central position like we have. (It work horizontally for "0")
Here on GNU/Linux default QT theme:
The trouble is normaly not under the Calculator.app code
Oh you are right, the trouble is that we are forcing all buttons the same height in the theme.
Can you please make the = button align to the bottom, so that at least it doesn't end up in between columns. Thanks!
If i do it the Vertical Grow Up will be disable.
That is more job , but i can easilly create a custum button class and got it type of result
Just for let you know i have look for create a custum button class, soon a screenshoot i hope ...
It should be calculated like this with the discount "%", which is more convenient because of the needs of life, especially shopping or online auctions.
I hope there is a paper tape that clearly records whether the numbers I entered are correct.
@louies0623 i have create the paper tape dialog last day afternoon :)
in fact i have recreate the Calc interface by use QDesigner.
Here what i code: https://flylib.com/books/en/2.585.1.81/1/
Here the QDesigner version
soon i'll push
If possible, please change the background color of C to #FF3333, then change the background of = to #FF9933, and finally change the background of the digital display to #CCFFCC and change its text to black #333333. In addition, the background of the dark gray button is changed to gray #777777, probably like this
Yes that is possible,
but from where come it color palette ? Have you a document link ?
For Nord -> https://www.nordtheme.com/docs/colors-and-palettes For Dracula -> https://spec.draculatheme.com/
The red color you propose is the same as darcula color palette
The color i use come from OsX color palette...
Html Web colors Tested by myself on Illustrator.
You speack about that ?
If not please send a screenshoot of you work for have a better understand of the final result
Here we are !
The red is a bit too red, make it darker.
Then we think of ways to make the buttons realistic.
The red is a bit too red, make it darker.
And we certainly don't want "flat design".
That suppose to load images in the background of each button.
I have 100% control of what is display on the custum button class. but i havent Calculator Buttons asset ready to use ...
Have you graphic any asset i can use ?
For inspiration:
https://freesvg.org/computer-keys-vector-image Maybe this
The better is to create our, that not take a tonne of time. I 'll send screenshoot's during my try.
After hours of try, import image and scale to max size is really hard to do.
I have better result by use QPainterPath and Gradient.
More rounded
You can reduce the white transparency gradient to about 60% and it will look much better. Then here is the design of the gradient that I think is pretty good (bottom button).
Here the code
if not self.state_pressed:
gradient = QLinearGradient(0, 0, 0, self.height() * 4)
gradient.setColorAt(0.0, Qt.white)
gradient.setColorAt(0.06, self.color())
gradient.setColorAt(0.7, Qt.black)
else:
gradient = QLinearGradient(0, 0, 0, self.height() * 4)
gradient.setColorAt(0.0, Qt.gray)
gradient.setColorAt(0.06, self.color())
gradient.setColorAt(0.7, Qt.black)
# Set painter colors to given values.
pen = QPen(self.outlineColor, self.bordersize)
painter.setPen(pen)
painter.setBrush(gradient)
Basic Layout
Scientific Layout
Yes it can controle the size ...
But look at me thaat cosine of 42 !!!
@louies0623 If you have color suggess for scientific layout. What about the Display gradient ?
SVG file
It would be better to change it to dark gray.