Helper to add an Alert Icon and creates a split layout for popups.
Details
Diff Detail
- Repository
- rB Blender
Event Timeline
| source/blender/editors/interface/interface_layout.c | ||
|---|---|---|
| 5952 | I'd call this uiItemsAlertBox(). | |
| 5956–5959 | These are not layout operations, I wouldn't put them here. Think it's fine to leave them duplicated in the caller. Or alternatively, add a UI_popup_block_alert_style() to interface_region_popup.c, or something like that. | |
Accepting but I still have some picky points on new comments.
| source/blender/editors/interface/interface_layout.c | ||
|---|---|---|
| 5946 | I don't think this describes it well really. I'd make it less about "alert icon", more about, "alert box layout with a big icon". Maybe "Alert Box with Big Icon" here? | |
| 5948 | This should be the doxygen comment for the function itself. Also (picky) grammar and capitalization seem weird. Suggestion: | |
What I mean is, the comment should be one for the function itself:
/**
* Blah blah blah.
*/
void fooBar()
{
...
}I think the \return blahblah comment in there is useful, I'd leave that in. The parameter descriptions I don't care much about :)
This patch forces all these icons to be the same size, so the one on the "About" dialog will be half the size is now.
That could be something we want to change, but shouldn't be part of this and should be a separate proposal.
This function should just take icon_size as an argument, rather than use the hard-coded "64" in there. Not only would that allow this function to work with all the dialogs have now (without also changing them) but also allows us to later make smaller alerts with smaller icons. For example a replacement for our "OK?" confirmations could use an icon in the 32-48 pixel size.
https://developer.blender.org/differential/diff/30845/?revisionID=9486
Make the icon size variable.
@Yevgeny Makarov (jenkm) - By the way, I still think it would be better to do something like this.
I agree too. The only reason the other logo was added to the Alert set was because of the possibility that we might have used it on the QuitClose instead of Warning on the Mac. Some programs on Mac use the Program's logo there so it made sense to add it to the sheet just in case. But in the end we thought it better to keep them consistent, instead of platform-varying.
I'd be all for changing out that one out (maybe use a block twice as wide as the others?), but only if you helped me move the "About" link to the Help menu. Otherwise nobody sees it anyway. LOL
@Harley Acheson (harley) - ... Otherwise nobody sees it anyway.
This is why changing the icon size after this patch is not so important ;)
This function should just take icon_size as an argument ... allows us to later make smaller alerts with smaller icons.
Dialogs of a different type/size will most likely have a different layout, so this won't apply to them.
Moreover, these icons are designed for a size of 64 pixel. You won't get a good result if you just scale to 32-48 pixel, you'll need a different set of icons of the desired size.
Just removed the changes to the "About" pop-up. A new design was proposed in D9507.
In any case, the confirmation dialogs and the "About" pop-up window are quite different things and should be separate.
