ImGui Button Icon not alignment properly - game-engine

My icon is not working properly in the ImGui::Button. I'm using the custom font named material-design from IconFontCppHeaders. My other icons are perform nicely, but the grid one is not acting correct. Here is my code:
ImGui::Button(_transparency ? ICON_MD_GRID_ON "##enable###gridTransparency" : ICON_MD_GRID_OFF "##disable###gridTransparency")
This line is used to change the icon just in one button, and it works fine. Is there any flags in ImGui that can adjust icons in Button?

Related

React native floating button

I've created bottom navigation with a custom floating button inside. Button/Menu is opening, but elements inside (with a red circle) are not touchable because the gray container is above them probably. This small fragment of the blue add button which is overlapping the gray container is also not touchable.
I was trying to add zIndex/elevation for menu buttons - but it doesn't help.
How to make a whole floating menu above on all containers.
All elements have a position set to absolute.
Code Reference
https://gist.github.com/gtarnowski/3b36deaeed71abee3d5e84567aa37eea
Image Reference
https://i.stack.imgur.com/fGkw0.jpg
I've tested the code you sent me and it seems to be working correctly. It's emitting the logs.
Below is the Snack link I created:
https://snack.expo.dev/#lineuxyz/greg-error

Slider control: border is invisible until I press and drag it

Why can't I see the slider bar in iOS and Android, only the thumb? In the simulator it's visible all the time. I have defined Slider and SliderFull in theme.res under "Unselected", and nowhere else.
I found a workaround: defining the styles in code instead of in the gui builder.

Yosemite Toolbar Style

How do I get the new toolbar item style of OSX Yosemite?
I created a standard toolbar, but the buttons don't have that button-like look. Do I need to drag actual buttons to the toolbar to get this look?
What I have:
What I want (that round bezel and white background):
There are two types of items in toolbars, image items and view items. It looks like you have an image item. You seem to want a view item where the view is an NSButton configured as a round textured button. So, yes, you should drag actual buttons to the toolbar.
I would not attempt to control the button background. You should use the button as-is to get the default system appearance. Apple recommends using a PDF template image (all black with the alpha channel used to make the image). The button itself would not have a title/label. Rather that would be on the containing toolbar item.
It looks like you may have applied an internal blue "glow" or highlight to your image. Generally, you should not do that. Let the frameworks apply appropriate effects to the template image automatically based on the button state and shows-state-by mode.
Toolbars in the Human Interface Guidelines
Controls which are appropriate to use in the window frame (including the toolbar)
Designing images for toolbar buttons
Works just fine for my Cocoa app under Yosemite -
are you actually setting the template property for your icon images..?
From the NSImage docs:
The 'template' property is metadata that allows clients to be smarter
about image processing. An image should be marked as a template if it
is basic glpyh-like black and white art that is intended to be
processed into derived images for use on screen.

Adding an image to 1 of the tabs on a TabControl, blocks my tab's text

Using Visual Studio 2005 (vb.net) (windows forms) on Windows XP, I have a standard Microsoft TabControl.
A button click adds/removes an image from 1 of the Tabs.
Seems like the image is placed OVER my tab's text, making it unreadable.
Why isn't it like it should be: Image on the left. Followed by text on the right.
Why is the image being placed OVER my tab's text? Do I need to do some kind of "refresh" or "redraw" before it will appear as it should?
I don't see any way to "make the image appear on the left edge of the tab". (NOT the tab-page.) ... and then place the text just to the right of the image. (Just like a normal image+text tab can do.)
The code is pretty simple, it just gets an image from my ImageList:
cfgTab.ImageKey = "PadLockClosed.png" ' Show CLOSED PadLock
The tab's text changes from:
This is my tab text
to:
T(IMAGE HERE)is my tab text
The image appears OVER the beginning of my text. But if I move to another tab, then move back, the image appears in the correct position:
(IMAGE HERE) This is my tab text
You can use docking and anchoring on your Control property so it will be placed according on what you want it to display.
Manage WinForm controls using the Anchor and Dock properties
Resizing a Single Control In WinForms
Regards

NSOutline/NSTableView source list Lion-style icons

From the Mac OS X HIG:
As with the icons that can be used inside toolbar controls, the system applies various effects to sidebar icons. To help you understand how these effects can change the appearance of a sidebar icon, consider the Finder Home icon, shown here in its unprocessed state[...]
So I'm trying to get my NSOutlineView to render a black sidebar icon with the typical new Lion style. I'm using a view-based NSOutlineView. However, I'm unable to find anything in the docs and if I simple set the imageView.image property to the sidebar image, it renders in black. So I figure there must be some sort of opt-in mechanism to get the sidebar to render it properly. Any suggestions on how to achieve that?
Apart from using the setTemplate: method of NSImage, you can just rename your images. This is from the documentation of imageNamed:…
If an application is linked in Mac OS X v10.5 or later, images
requested using this method and whose name ends in the word “Template”
are automatically marked as template images.