Hey all
While we're at it, during testing font metrics on different platforms, I noticed that menus are quite different. On Linux, the menu bar height is 30px, on Windows 19px. Personally, I find the 30px ugly and too large.
Can this be made consistent across platforms, too?
Roman
On 2017-02-16 11:41, Roman Haefeli wrote:
Hey all
While we're at it, during testing font metrics on different platforms, I noticed that menus are quite different. On Linux, the menu bar height is 30px, on Windows 19px. Personally, I find the 30px ugly and too large.
Can this be made consistent across platforms, too?
shouldn't it be made consistent with the various platforms instead? that is: if he new iOS look-and-feel mandates 42px menu-bars, users should get them - rather than 12px to be consistent with BeOS.
apart from that, I agree that the menu bar on Linux is uglishly high.
but my point is: it is ugly because it is higher than the menu-bars of other applications on my Linux system, not because i enjoy staring at the w32 version in my spare time.
gasmdr IOhannes
On Don, 2017-02-16 at 11:56 +0100, IOhannes m zmoelnig wrote:
On 2017-02-16 11:41, Roman Haefeli wrote:
Hey all
While we're at it, during testing font metrics on different platforms, I noticed that menus are quite different. On Linux, the menu bar height is 30px, on Windows 19px. Personally, I find the 30px ugly and too large.
Can this be made consistent across platforms, too?
shouldn't it be made consistent with the various platforms instead? that is: if he new iOS look-and-feel mandates 42px menu-bars, users should get them - rather than 12px to be consistent with BeOS.
apart from that, I agree that the menu bar on Linux is uglishly high.
but my point is: it is ugly because it is higher than the menu-bars of other applications on my Linux system, not because i enjoy staring at the w32 version in my spare time.
I see your point about being consistent within a certain platform. And am I happy that I'm not the only one who finds Pd's menu bars on Linux too high. Is that also configured in pd-gui.tcl? I wasn't able to spot it at a first quick glance.
Roman
Line 351
set ::menubarsize 22
?
Mensaje telepatico asistido por maquinas.
From: Pd-list pd-list-bounces@lists.iem.at on behalf of Roman Haefeli reduzent@gmail.com Sent: Thursday, February 16, 2017 12:05 PM To: pd-list@lists.iem.at Subject: Re: [PD] Menu bar height (differences across platforms)
On Don, 2017-02-16 at 11:56 +0100, IOhannes m zmoelnig wrote:
On 2017-02-16 11:41, Roman Haefeli wrote:
Hey all
While we're at it, during testing font metrics on different platforms, I noticed that menus are quite different. On Linux, the menu bar height is 30px, on Windows 19px. Personally, I find the 30px ugly and too large.
Can this be made consistent across platforms, too?
shouldn't it be made consistent with the various platforms instead? that is: if he new iOS look-and-feel mandates 42px menu-bars, users should get them - rather than 12px to be consistent with BeOS.
apart from that, I agree that the menu bar on Linux is uglishly high.
but my point is: it is ugly because it is higher than the menu-bars of other applications on my Linux system, not because i enjoy staring at the w32 version in my spare time.
I see your point about being consistent within a certain platform. And am I happy that I'm not the only one who finds Pd's menu bars on Linux too high. Is that also configured in pd-gui.tcl? I wasn't able to spot it at a first quick glance.
Roman
On Don, 2017-02-16 at 12:26 +0000, Lucas Cordiviola wrote:
Line 351
set ::menubarsize 22
?
Thanks, that looks promising, but it doesn't do anything on Linux when editing the value for x11 window system (it is already configured to 19, but resulting height is 30px).
Is it overridden somewhere? I'm lost...
Roman
On Don, 2017-02-16 at 13:42 +0100, Roman Haefeli wrote:
On Don, 2017-02-16 at 12:26 +0000, Lucas Cordiviola wrote:
Line 351
set ::menubarsize 22
?
Thanks, that looks promising, but it doesn't do anything on Linux when editing the value for x11 window system (it is already configured to 19, but resulting height is 30px).
And for Windows it is set to 0 and changing it doesn't show any effect either.
Roman
Is it overridden somewhere? I'm lost...
could be.
Recently there were mentions for negative values on pixel settings:
I`m totally blind on linux.
Try -10
seems negative values inhibits resizing.
just to try.
Mensaje telepatico asistido por maquinas.
From: Pd-list pd-list-bounces@lists.iem.at on behalf of Roman Haefeli reduzent@gmail.com Sent: Thursday, February 16, 2017 12:42 PM To: pd-list@lists.iem.at Subject: Re: [PD] Menu bar height (differences across platforms)
On Don, 2017-02-16 at 12:26 +0000, Lucas Cordiviola wrote:
Line 351
set ::menubarsize 22
?
Thanks, that looks promising, but it doesn't do anything on Linux when editing the value for x11 window system (it is already configured to 19, but resulting height is 30px).
Is it overridden somewhere? I'm lost...
Roman
Or try 0 "cero"
Mensaje telepatico asistido por maquinas.
From: Pd-list pd-list-bounces@lists.iem.at on behalf of Lucas Cordiviola lucarda27@hotmail.com Sent: Thursday, February 16, 2017 12:53 PM To: pd-list@lists.iem.at Subject: Re: [PD] Menu bar height (differences across platforms)
Is it overridden somewhere? I'm lost...
could be.
Recently there were mentions for negative values on pixel settings:
I`m totally blind on linux.
Try -10
seems negative values inhibits resizing.
just to try.
Mensaje telepatico asistido por maquinas.
From: Pd-list pd-list-bounces@lists.iem.at on behalf of Roman Haefeli reduzent@gmail.com Sent: Thursday, February 16, 2017 12:42 PM To: pd-list@lists.iem.at Subject: Re: [PD] Menu bar height (differences across platforms)
On Don, 2017-02-16 at 12:26 +0000, Lucas Cordiviola wrote:
Line 351
set ::menubarsize 22
?
Thanks, that looks promising, but it doesn't do anything on Linux when editing the value for x11 window system (it is already configured to 19, but resulting height is 30px).
Is it overridden somewhere? I'm lost...
Roman
Here`s the backup:
line 306
# some platforms have a menubar on the top, so place below them set ::menubarsize 0 # Tk handles the window placement differently on each # platform. With X11, the x,y placement refers to the window # frame's upper left corner. http://wiki.tcl.tk/11502 set ::windowframex 3 set ::windowframey 53 # TODO add wm iconphoto/iconbitmap here if it makes sense
Try changing these:
set ::windowframex 3 set ::windowframey 53
try both to 0
Mensaje telepatico asistido por maquinas.
From: Pd-list pd-list-bounces@lists.iem.at on behalf of Roman Haefeli reduzent@gmail.com Sent: Thursday, February 16, 2017 1:13 PM To: pd-list@lists.iem.at Subject: Re: [PD] Menu bar height (differences across platforms)
On Don, 2017-02-16 at 12:57 +0000, Lucas Cordiviola wrote:
Or try 0 "cero"
I tried negative values and zero, too: No effect. I commented out the line (pd-gui.tcl:307):
set ::menubarsize 19
and there is no error nor any change in the GUI. It seems this line is obsolete. (?)
Roman
On 2017-02-16 14:39, Lucas Cordiviola wrote:
Here`s the backup:
line 306
# some platforms have a menubar on the top, so place below them set ::menubarsize 0 # Tk handles the window placement differently on each # platform. With X11, the x,y placement refers to the window # frame's upper left corner. http://wiki.tcl.tk/11502 set ::windowframex 3 set ::windowframey 53 # TODO add wm iconphoto/iconbitmap here if it makes sense
Try changing these:
set ::windowframex 3 set ::windowframey 53
try both to 0
???
it seems like you are changing some random variables to achieve an unrelated goal. the windowfram{xy} vars have nothing to do with the size of Pd's menu.
just for reference:
$::menubarsize is the size of the OSX menubar on top of the screen. this is the menubar with spotlight and whatnot; it has a fixed size (unchangable by any application, including Pd). this is totally unrelated to the size of Pd's menu on systems that don't have a menubar.
$::windowframex this is the width of the window decoration (the tiny border left to the actual window content.
$::windowframey similar to $::windowframex, this is the height of the window decoration (including any window title)
all those variables are used for window placement. as the comments suggest, tcl/tk handles window positioning different on various platforms. sometimes the window position includes the window decoration, and sometimes not. these variables are an attempt to open the window at the same place where you closed them. as mentioned in the comment, there's more info in http://wiki.tcl.tk/11502
if you want to change the size of the Pd-menu, you have to look somewhere else...
fgamsdr IOhannes
Thanks for the clarification, especially for menubarsize. It all makes a bit more sense to me now.
Roman
On Don, 2017-02-16 at 15:18 +0100, IOhannes m zmoelnig wrote:
On 2017-02-16 14:39, Lucas Cordiviola wrote:
Here`s the backup:
line 306
# some platforms have a menubar on the top, so place below them set ::menubarsize 0 # Tk handles the window placement differently on each # platform. With X11, the x,y placement refers to the window # frame's upper left corner. http://wiki.tcl.tk/11502 set ::windowframex 3 set ::windowframey 53 # TODO add wm iconphoto/iconbitmap here if it makes sense
Try changing these:
set ::windowframex 3 set ::windowframey 53
try both to 0
???
it seems like you are changing some random variables to achieve an unrelated goal. the windowfram{xy} vars have nothing to do with the size of Pd's menu.
just for reference:
$::menubarsize is the size of the OSX menubar on top of the screen. this is the menubar with spotlight and whatnot; it has a fixed size (unchangable by any application, including Pd). this is totally unrelated to the size of Pd's menu on systems that don't have a menubar.
$::windowframex this is the width of the window decoration (the tiny border left to the actual window content.
$::windowframey similar to $::windowframex, this is the height of the window decoration (including any window title)
all those variables are used for window placement. as the comments suggest, tcl/tk handles window positioning different on various platforms. sometimes the window position includes the window decoration, and sometimes not. these variables are an attempt to open the window at the same place where you closed them. as mentioned in the comment, there's more info in http://wiki.tcl.tk/ 11502
if you want to change the size of the Pd-menu, you have to look somewhere else...
fgamsdr IOhannes
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/lis tinfo/pd-list
On 2017-02-16 15:18, IOhannes m zmoelnig wrote:
if you want to change the size of the Pd-menu, you have to look somewhere else...
it seems like that slightly too high menu on X11 is just the way tcl/tk creates menus on that platform:
just run this script (using wish): <test.tcl> set m [menu .menubar] . configure -menu $m menu $m.file $m add cascade -menu $m.file -label File </test.tcl>
i'd suggest playing around with that script to find out how to change the menu height, and then port those ideas back to Pd. otoh, the manual [1] doesn't offer any obvious solution, so most likely it is just impossible to change that.
mfgadr IOhannes
On Don, 2017-02-16 at 15:31 +0100, IOhannes m zmoelnig wrote:
On 2017-02-16 15:18, IOhannes m zmoelnig wrote:
if you want to change the size of the Pd-menu, you have to look somewhere else...
it seems like that slightly too high menu on X11 is just the way tcl/tk creates menus on that platform:
just run this script (using wish): <test.tcl> set m [menu .menubar] . configure -menu $m menu $m.file $m add cascade -menu $m.file -label File </test.tcl>
i'd suggest playing around with that script to find out how to change the menu height, and then port those ideas back to Pd. otoh, the manual [1] doesn't offer any obvious solution, so most likely it is just impossible to change that.
I managed to change height of the menu by changing pd_menus.tcl:38 from:
menu $menubar
to:
menu $menubar -activeborderwidth -2 -borderwidth 0
As (unwanted) side effect, the menu items are spaced more closely to each other. Please have a look at attached screenshot (on the left Pd on Ubuntu, on the right Pd in Wine). Those flags are platform specific and don't have any effect on Windows.
Roman
Hi, great that purr-data is finally out.
I went back to this thread https://www.mail-archive.com/pd-list@lists.iem.at/msg10518.html which briefly touched on the topic of visualizing HTML pages inside purr data, but did not find the solution to my problem.
Using <iframe> seems to load local files just fine, but it does not load remote files: any src="http://website" attribute will display "localhost" and any src="http://website/pagenNotOnLocalhost" will give me a 404.
I then tried to use <webview>, which seems like it is the correct way of handling these things in nw : http://docs.nwjs.io/en/latest/References/webview%20Tag/ This only creates an empty block object in the page, but devtools give no error/warning about its content not being loaded.
Incidentally, is this the right list to discuss about purr-data or should I do this elsewhere?
Thanks, Giulio
Hi,
great that purr-data is finally out.
I went back to this thread
https://www.mail-archive.com/pd-list@lists.iem.at/msg10518.html which briefly touched on the topic of visualizing HTML pages inside purr data, but did not find the solution to my problem.
Using <iframe> seems to load local files just fine, but it does not load remote files: any src="http://website" attribute will display "localhost" and any src="http://website/pagenNotOnLocalhost" will give me a 404.
There's a setting you have to remove in the package.json file: "chromium-args": "--proxy-server=http://127.0.0.1",
I put that there because currently any network functionality happens from the Pd process. The GUI only makes a tcp connection to the Pd process and that's it. If you remove that line then you'll be able to make network requests from the GUI. Also, Chromium will make whatever connections it thinks it needs to fetch whitelists and whatever else it does to try to keep your machine from becoming a solider in somebody's botnet. -Jonathan
Nice, that works for <iframe>. Any idea why I see nothing in <webview> objects? Thanks, Giulio ________________________________
From: Jonathan Wilkes jancsika@yahoo.com To: Giulio Moro giuliomoro@yahoo.it; "pd-list@lists.iem.at" pd-list@lists.iem.at Sent: Thursday, 16 February 2017, 22:49 Subject: Re: Visualising HTML page in Purr-data
Hi, great that purr-data is finally out. I went back to this thread
https://www.mail-archive.com/pd-list@lists.iem.at/msg10518.html which briefly touched on the topic of visualizing HTML pages inside purr data, but did not find the solution to my problem.
Using <iframe> seems to load local files just fine, but it does not load remote files: any src="http://website" attribute will display "localhost" and any src="http://website/pagenNotOnLocalhost" will give me a 404.
There's a setting you have to remove in the package.json file: "chromium-args": "--proxy-server=http://127.0.0.1", I put that there because currently any network functionality happens from the Pd process. The GUI only makes a tcp connection to the Pd process and that's it.
If you remove that line then you'll be able to make network requests from the GUI. Also, Chromium will make whatever connections it thinks it needs to fetch whitelists and whatever else it does to try to keep your machine from becoming a solider in somebody's botnet.
-Jonathan
Nice, that works for <iframe>.
Any idea why I see nothing in <webview> objects?
Unfortunately I don't-- I've been working mostly in SVG land, and only the simple parts of HTML for input, divs and some CSS styling. I have seen some discussions of webview in the nw.js mailing list, so you might check there.
Thanks, Giulio
From: Jonathan Wilkes jancsika@yahoo.com To: Giulio Moro giuliomoro@yahoo.it; "pd-list@lists.iem.at" pd-list@lists.iem.at Sent: Thursday, 16 February 2017, 22:49 Subject: Re: Visualising HTML page in Purr-data
Hi, great that purr-data is finally out. I went back to this thread
https://www.mail-archive.com/pd-list@lists.iem.at/msg10518.html which briefly touched on the topic of visualizing HTML pages inside purr data, but did not find the solution to my problem.
Using <iframe> seems to load local files just fine, but it does not load remote files: any src="http://website" attribute will display "localhost" and any src="http://website/pagenNotOnLocalhost" will give me a 404.
There's a setting you have to remove in the package.json file: "chromium-args": "--proxy-server=http://127.0.0.1", I put that there because currently any network functionality happens from the Pd process. The GUI only makes a tcp connection to the Pd process and that's it.
If you remove that line then you'll be able to make network requests from the GUI. Also, Chromium will make whatever connections it thinks it needs to fetch whitelists and whatever else it does to try to keep your machine from becoming a solider in somebody's botnet.
-Jonathan
On Don, 2017-02-16 at 13:39 +0000, Lucas Cordiviola wrote:
Here`s the backup:
line 306
# some platforms have a menubar on the top, so place below them set ::menubarsize 0 # Tk handles the window placement differently on each # platform. With X11, the x,y placement refers to the window # frame's upper left corner. http://wiki.tcl.tk/11502 set ::windowframex 3 set ::windowframey 53 # TODO add wm iconphoto/iconbitmap here if it makes sense
Try changing these:
set ::windowframex 3 set ::windowframey 53
try both to 0
Those actually do something, but they have a different purpose. They specify the size of the window frame so that patch canvas is restored to the same position it was saved with. If those values are "wrong" the canvas is displayed with an offset after each save. I already fix those numbers each time I install Pd to match my fluxbox style's small window decorations. For me good values are 0 (x) and 43 (y). However, it works only as long as the menu fits into one line. As soon as the canvas is narrow enough for the menu to wrap, displacement occurs again.
Try this:
Create a subpatch [pd foo] in a new patch window. Then create this:
[vis 0, vis 1( | [s pd-foo]
Whenever you click the message box, you see the canvas of [pd foo] moving a bit, depending on how "wrong" your values are. 0 0 is certainly wrong for everyone.
Roman
On 2017-02-16 15:18, Roman Haefeli wrote:
Whenever you click the message box, you see the canvas of [pd foo] moving a bit, depending on how "wrong" your values are. 0 0 is certainly wrong for everyone.
since this came up on my radar and i was pointed at http://wiki.tcl.tk/11502, i took the liberty to (hopefully) fix the issue with the moving [vis 0, vis 1( windows.
https://github.com/pure-data/pure-data/pull/44
this fixes the ::windowframe values on X11 by calculating the *actual* values on the fly. afaik this is only a problem on X11, so the fix is only enabled there.
please test. the basic test is just what roman mentioned in the last mail:
Create a subpatch [pd foo] in a new patch window. Then create this:
[vis 0, vis 1( | [s pd-foo]
if the subpatch window stays at the same position when repeatedly clicking the vis-msgbox, then the problem is fixed.
fgmasdr IOhannes
On Don, 2017-02-16 at 16:14 +0100, IOhannes m zmoelnig wrote:
On 2017-02-16 15:18, Roman Haefeli wrote:
Whenever you click the message box, you see the canvas of [pd foo] moving a bit, depending on how "wrong" your values are. 0 0 is certainly wrong for everyone.
since this came up on my radar and i was pointed at http://wiki.tcl.tk/11502, i took the liberty to (hopefully) fix the issue with the moving [vis 0, vis 1( windows.
https://github.com/pure-data/pure-data/pull/44
this fixes the ::windowframe values on X11 by calculating the *actual* values on the fly. afaik this is only a problem on X11, so the fix is only enabled there.
Neat! I am glad we discussed about it! It works for me and it prints the correct values to stderr.
Small culprit: When the menu wraps, the window still moves. Anyway, I'll hope this fix makes it into Pd.
Roman