change height of a client window? - resize

I was wondering if there was a way that I could resize window height in awesome. sort of like how I could make the master wider or narrower, is there a way to make a window lower in the stack taller or shorter? Documentation has not helped, so I figured I'd ask here before just giving up.

I think you might be looking for window factors. The relevant API docs (that don't say much) are here:
https://awesomewm.org/doc/api/classes/client.html#awful.client.setwfact
https://awesomewm.org/doc/api/classes/client.html#awful.client.incwfact

Related

Is it possible to adjust the height of ApplicationBarMenuItem in Windows Phone 8

I have searched for quite a while to find the answer.
Unfortunately, there is not even single one answer can be found on the Internet.
I only have one ApplicationBarMenuItem inside the ApplicationBar which is "About". And after I saw the effect of the "opened" ApplicationBar, I think it is too "fat" (the height of the item is too much, or maybe the line spacing/margin-top and margin-bottom/padding-top and padding-bottom etc...I'm trying to create an image for you, because I don't know how to get a screen shot for that, but anyway I'm sure you know what I mean :))
So here again is the question, is it possible to change the height of ApplicationBarMenuItem in Windows Phone 8?
Many thanks.
No, you can't change the AppBar menu item height.
But... i think this is the way the appbar looks in any system application you can take a look at, and the user isn't going to be dissapointed by the size, is just the expected size. Only my two cents, but i don't think you need to worry about that.

Windows Form Compiles to Different Size than desinger

This may be fairly obvious as I cant find it on Google but I have a windows form of a given height and width in the VS Designer and it looks perfect.
The object inspector and the ViewDesigner.VB all match up.
But when it gets compiled the window is noticeably bigger and brings with it a whole heap of wasted space around the edges. This is more than just ClientSize etc. This is a good inch or two.
Any idea whats causing it? It's not a resolution issue as this happens on the same machine.
For future reference this was nothing I was doing, it was coded into the larger application to retain window states.
So it simply re-sized to either what it was or what it thought it should be.
Thanks for the help and suggestions either way.

NSWindow attached to cursor

I would like to make a custom panel, that shows a zoom at the current cursor-location.
Like for example 'Sip' does.
I have searched the web for examples, but didn't find anything specific.
I found NSEvent's addGlobalMonitorForEventsMatchingMask:handler: and addLocalMonitorForEventsMatchingMask:handler: methods.
Now I could just set the frame origin of the window.
But I'm not sure if that's really the right solution.
Is there a better way to do this?
Could anyone point me into some sample-code?
That's basically it.
You can also use the Quartz Event Tap function family CGEventTap, as it will provide a little more responsiveness during events like the Mac application switcher and Exposé or Mission Control or Dashboard. However, it is a little harder to set up, and uses a C callback approach that is a little tougher to use with some things.
Quartz Event Taps are otherwise the same thing, but possibly slightly faster.
If you use that, be sure to use the function CGPoint CGEventGetUnflippedLocation(CGEventRef aCGEvent)
As in:
CGPoint eventLocation = CGEventGetUnflippedLocation(aCGEvent);
That will make sure your y coordinates are bottom left like the rest of Cocoa.
Otherwise use its sibling CGEventGetLocation() which for some odd reason of crappy naming doesn't indicate that it returns flipped coordinates. (but the docs do state this)

How can I get the height of a QListWidgetItem in a QListWidget in PyQt?

Actually, how can I extract size of gui elements in general in PyQt?
So far I have only found sizeHint mentioning anything regarding sizes in PyQt.
Could anyone please explain how sizes works in PyQt?
In general, it's not possible to guarantee the exact sizes of widgets, because there are so many different factors that come in to play. Widgets will rendered differently depending on the window manager in use, the current GUI style, the fonts, etc - and each platform has it's own peculiarities.
To get a better understanding of all this, I would suggest you take a look at Qt's own overviews of window geometry, widgets and layouts and layout management.
To answer the specific question on the height of QListWidgetItems: they will have whatever height is calculated by the QListWidget when it lays out its items. This may take into account the items' sizeHint, which can be set programmatically with QListWidgetItem.setSizeHint.

How do I render the scrollable regions of a canvas with IViewObject::Draw?

I've been trying to render the entire canvas in an IWebBrowser2 control to a bitmap. IViewObject::Draw seems to be the most promising approach, but I can't get it to render anything that would requires a scroll to show. While I could automate the scrolling and stitch the images together, this would look weird with any fixed position elements. Is this even doable?
Additionally, I've tried to set the controller's size to one that would allow the entire contents to display without needing to scroll, but Windows caps the max size to the current screen resolution, so that only gets me partially there.
Any help would be much appreciated. I'm currently doing this in the context of Win7 and IE8, but I don't think that should matter much.
Sorry it took so long for me to follow up with the answer to this.
I wrote up an article detailing how to trick Windows into allowing you to resize a window larger than the virtual screen resolution, allowing functions like PrintWindow or IViewObject::Draw to capture the entire client area (i.e., the browser canvas).
http://nirvdrum.com/2010/03/25/how-to-take-full-page-or-full-canvas-screenshots-in-windows.html
An actual implementation of the technique can be found in my SnapsIE repository on GitHub (username: nirvdrum). Unfortunately I don't have enough karma to post two hyperlinks. The repository is linked from the article though.
It is very likely an IE optimisation that avoid to draw more than required. You might be able to scroll the window and call IViewObject::Draw in a loop without any animation occuring ?
I'm surprised that Windows caps the max size to the current screen resolution. Are you sure about that ?