- 
          
 - 
                Notifications
    
You must be signed in to change notification settings  - Fork 23.5k
 
Modern Style: Use a style box for Input Map actions #112233
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| 
           I agree with the linked complaint too, it was a technical compromise rather than a design choice. The coupling that you found is the reason why this problem needs a slightly more involved solution to make it possible to style them separately imo. In addition to them being coupled and not supporting rounded corners there's also an issue of inspector sections having hardcoded alpha multiplier for nested sections. Because of that you can't use subtle background colors for top-level sections as the generated sub-sections become hardly noticeable way too quickly (in both themes), here's an example from this PR: Those limitations made it hard to fit those elements into the gdscript theme in any tasteful way which is why I had to compromise and omit them entirely. But now that the theme has been nativized it would make sense to solve that. All of those things needs to be drawing themable styleboxes to support rounded corners. Inspector sections will probably also need to be reimplemented using   | 
    
331ab99    to
    c31eb5f      
    Compare
  
    prop_subsection| 
           I added a new property on both themes specifically for the Input Map settings. There shouldn't be side effects anymore, but custom themes that set  One problem at a time. The problem was the lack of contrast and highlights in Input Map, only that is solved here. (I would probably make another PR to use a fully transparent subsection color specific to the Inspector in the future, that's the only place where setting   | 
    
| 
           @DeeJayLSP I think @passivestar meant is that the ideal solution would be making those sections use  However, this component is not   | 
    
| 
           I completely agree with @DeeJayLSP  | 
    
c31eb5f    to
    dd180bc      
    Compare
  
    
          
 Pushed. Before and After images updated.  | 
    
1751034    to
    54b8a11      
    Compare
  
    54b8a11    to
    1190efb      
    Compare
  
    8e18196    to
    60d6c55      
    Compare
  
    | 
           Exposed a   | 
    
60d6c55    to
    aee211b      
    Compare
  
    | 
           Rebased on top of the recent change from #112277. All property renames addressed.  | 
    
| 
           Thanks!  | 
    






Addresses one of the complains about the new style. One which I couldn't disagree.
The new style makes the Input Map editor too flat. I modified it so it at least highlights the actions.
This is done by using
TreeItem::CELL_MODE_CUSTOMalongside a callback that draws a StyleBox, which I namedstyle_highlight_subsection. The Deadzone column usesTreeItem::CELL_MODE_RANGE, meaning it can't be applied to them, unfortunately.I avoided picking a color too bright as it would make the contrast between the text and the background too low, so it's just a tiny increase to work as a separator.
The StyleBox is fully transparent in the Classic theme, therefore it should not be affected.
Dark theme
Light theme
Classic style for reference:
