Glass AlertDialog upsizing icon - google-glass

I am following all the instruction from https://developers.google.com/glass/develop/gdk/card-design#alert
but the icon displaying in alert dialog is stretched and clipped as shown below:
Please guide how to correct this issue.
Thank you.

Make sure that your icon is in the drawable-hdpi folder of your res directory and not in the plain drawable folder or the folder for a different pixel density.

Related

svg icons appears pixelated on high DPI

Some of my SVG icons don't scale properly on scaling a monitor (Win10) or use a highDPI monitor (Win10, Linux, Mac). This applies to icons assigned to a QAction and displayed by QMenu entries or QToolButtons, and icons assigned to QDockWidgets, as shown in the upper part of the attached screenshot.
The icons in the lower part are painted in the derived paintEvent(..) and render perfectly.
Using the option QApplication::setAttribute(Qt::AA_UseHighDpiPixmaps); The system seams to use some scaling heuristic on a pixmap so the icon becomes somehow edgy:
Is there any way to make qt redraw the icon on the SVG base without the need to derive all icon-showing classes?
Sincerely
JJ
I had this issue with SVG icons too. Turns out for me it was caused by an aspect ratio difference between the SVG file and what I tried to render it as. I tried to render as a square but my SVG file was not square. Setting square dimensions in the SVG file fixed it.

Qt: Bad window icon quality

I'm using Qt 5.10.1. I created a window icon resource and applied to Qt application like following:
a.setWindowIcon(QIcon(":/icons/resources/logo_icon.png"));
The size of logo_icon.png is 256*256.
The result is this:
The icon is a little blurrly, which is not what I expected. For comparison, following is the window icon of GIMP in which I designed the icon:
I tried various sizes of the image from 16*16 to 256*256, there was no luck. Changing image format to ico from png also didn't work.
What should I do to render a clearer window icon?
Maybe in the ui file of your window there is a iconSize value that makes your icon scale not very well when rendered by the window manager. This blurry effect occurred to me sometimes because the size was 15 px instead of 16 (or another power of 2).
Try to open the .ui file of your main window in Design mode and look under the QMainWindow group in the widget properties panel to set the iconSize to something like 16.
You can also set the icon file from there, using the windowIcon property under the QWidget group.

View all content inside win32 window

I cannot see text/graphics at the very bottom of my win32 window, because it extends larger than my screen can fit. Even when I go in fullscreen mode, I cannot see the bottom text.
Is there a way for me to adjust my window or zoom-out of my window in order to see the stuff at the bottom? Or am I supposed to shrink all the contents inside the window?
I'm not exactly sure what I should do, but any guidance would be appreciated. Also I'm using C++.
Thanks.
You pretty much have two options:
Add a scrollbar (Adjust the window style or add a scrollbar control)
Stretch/shrink/resize the content

How show Statically a Picture With Picture Control in MFC?

I Have do Follow :
Drag Picture Control to dialog.
Go to Picture Control propeties.
Change its "Type" to Bitmap.
Then I Add Bitamap ID, and Picture is showed in Picture Control,
But When I Run the Program, nothing show in Picture Control.
Wheres the Problem?
I used the following procedure to make this work.
First: Add "Microsoft Forms 2.0 Image" Control to the ToolBox.
Second: Drag a "Microsoft Forms 2.0 Image" to Form.
Third: Select That and Add a Picture From Picture Properties.
Is OK and Work 100 Percentage.

Image in picture control in MFC dilaog is larger when running applicaiton than is shown in dialog editor

I am creating a MFC CDialog and adding a bitmap in a picture control and I have edit controls that need to be placed relative to positions on the image. However the size of the image in the picture control changes when I run my application.
This makes it difficult to align my edit boxes with the image.
Can anybody tell me why this happens?
There is no code to post as this is entirely done in the dialog editor of VS2013.
Windows adjusts the size of dialogs to match the system font, which can be changed by the user. For information about this look up dialog base units. If you need your dialog layout to match a bitmap then you need to override the Windows adjustment and explicitly set the size and location of the controls at run time. That would mean that in OnInitDialog you use MoveWindow on the dialog itself and on every control to set their size and location in pixel units that match the bitmap.