Changing all font sizes in Tkinter/Python3 [duplicate] - python-3.x

This question already has answers here:
How to modify the default font in Tkinter?
(2 answers)
Closed 7 years ago.
I would like to change the font size globally in a Python3/Tkinter program. I've managed to do it in the buttons and labels in the main window, but I also have a messagebox in the program that only displays the default font size.

Im not certain but I believe you can use ttk to change global font size

Related

Why does Matplotlib saved figure look weird? [duplicate]

This question already has answers here:
Matplotlib savefig background always transparent
(2 answers)
How to set opacity of background colour of graph with Matplotlib
(2 answers)
Closed 1 year ago.
I am using the plotting pandas data frame and, saved the resulting figure using the following code. The output file looks weird when opened in image viewer as shown here.I don't understand why the background is not fully white.
I am using Linux OS called Zorin, which is a derivative of Ubuntu if that makes a difference.
fig, ax = plt.subplots(figsize=(15, 10))
account_profit_df.plot(
style="*-",
figsize=(15, 10),
title="test",
ax=ax,
)
plt.grid()
fig.savefig(
image_path_backtest,
bbox_inches="tight",
)
This is the default behaviour, you can set the background color using: fig.patch.set_facecolor('white')

How to fix OOP Issue with opacity change in pygame [duplicate]

This question already has answers here:
How to convert the background color of image to match the color of Pygame window?
(1 answer)
How do I make the screen ignore the background color of some image?
(1 answer)
Pygame image transparency confusion
(1 answer)
Closed 1 year ago.
I'm trying to make pieces of what makes pygame into it's own separate classes/definitions. But when trying to set the opacity of an image, Instead of showing up as excepted, It starts from it's set opacity and lightens up until it reaches the maximum opacity possible.
I have tried to see if the opacity changes in the module that contains the game, and in the module that contains the classes. Yet they end up giving me the correct number that should be the number that is set for the opacity. And yes I have looked for anything that could possibly start adding up the opacity by mistake.
This is the piece of the code that i'm using to edit an image.
class PicEditor:
def scale(Pic,scaleX,scaleY):
Pic.blit = pygame.transform.scale(Pic.blit,(scaleX,scaleY))
def opacity(Pic,opc):
Pic.blit.set_alpha(opc)
print(opc) #attempt at figuring out the problem
And this is the code that i'm trying to run.
while not crashed:
display.gameLoopTop() #the usual game loop used ontop in pygame
PicEditor.opacity(templatePic,opacityTemplate) #the issue
PicEditor.scale(templatePic,displayX,displayY) #scaling an image (works fine)
templatePic.blitIMG() #bliting the image
display.gameLoopBottom() #the bottom of a game loop which includes the clock function and pygame display update
pygame.quit()
exit()
The expected results are that the image will change it's opacity by 50 (opacityTemplate = 50), then that the image will fit the size of the screen (displayX,displayY) and then that it is blited.
Everything runs perfectly, except that the opacity of the image goes from it's number given- 50, and adds another 50 until it reaches the maximum opacity possible without crashing.

How to increase the horizontal split window size in Vim [duplicate]

This question already has answers here:
How to increase the vertical split window size in Vim
(10 answers)
Closed 7 years ago.
I have two open files in horizontal mode. How do I increase or decrease the height of either?
:30winc > and :30winc <
works for the width. But...
:30hinc > and :30hinc <
doesn't work for the height.
Use :30winc, but use + or - instead.

vim on ultra-high display (3200-1800) on Windows 8 [duplicate]

This question already has answers here:
How do I set the default font size in Vim?
(8 answers)
Closed 8 years ago.
gvim for windows has tiny text and icons on my ultra-HD Dell laptop (3200-1800) . In fact, it is barely readable. How does one change gvim gui fonts and increases the icons to obtain readable text on a high resolution, windows 8 laptop?
you should configure you font size, one possible solution is is like this(you can put it in your vimrc):
set guifont=Consolas:h13
"Consolas" is the font name and "h13" is the font size, you should change 13 to a proper number~
(I'm not sure about Windows, but...)
It really depends. If you're using vim from a terminal emulator the settings must be changed in your terminal emulator (let's say PuTTy).
But if you're using GVIM, then use :set guifont font\ name\ size to specify the font size.
In order to check witch font and size you're using, simple call :set guifont and it will promt you with the current settings
In my case I use the following: :set guifont=Ubuntu\ Mono\ 18

how to make a jpeg image semi transparent using gimp? [duplicate]

This question already has an answer here:
Closed 10 years ago.
Possible Duplicate:
Image background transparent GIMP
I've a jpeg image. i'd like to make it more transparent as i'm using it in my android app as a background. It will have textview in front of it and the image's colours can clash with text in the views.
How can i increase transparency using GIMP?
A JPEG image can not support an alpha channel (transparency) and so you would need to use a file format that can. My recommendation would be .PNG

Resources