Dropdown colours?
-
I'm attempting to change the dropdown colours for a combo box. I was able to change the icon using LAF but I'm not sure how to change the background colour?
-
@paper_lung You can do it with laf, these are the functions:
const comboBox = Content.createLocalLookAndFeel(); comboBox.registerFunction("drawComboBox", function(g, obj) { }); comboBox.registerFunction("drawPopupMenuBackground", function(g, obj) { }); comboBox.registerFunction("drawPopupMenuItem", function(g, obj) { });
-
@d-healey said in Dropdown colours?:
comboBox.registerFunction("drawPopupMenuBackground", function(g, obj)
{
});Actually this one is broken...
ComboBoxLAF.registerFunction("drawPopupMenuBackground", function(g, obj) { // a comment only });
will render a completely white background - well it does for me - no matter what you put in there it does this...
-
@Lindon Works here. Are you also filling in the background in the
drawPopupMenuItem
function?HiseSnippet 895.3ocsV01aaaCDlzIJaV6EzBre.B9SN.FF1socCnXHM1IdvXwoFyYE6aczTmk4BEo.EUSLF5+48On6ndwVYwKu3g4OXv68m63cG0TilCooZCg17xUI.g90dyVorKGtjITjwmRneq2DVpELAErFrJgklBgDJcuexwf1beR9u+53ALISwgMrHj2qEb3bQrvtg6z29yBobDKDtTDWS6id6XtVMTK0YHd1yqGIgwuhEAWvbp0viPO3rPgUalYYVHE0YfNb0rk5qUE5+dQpXtDbD8IyPGUvlLboPFNsJWSID59S2j46Uj4em2DQnXM+MUfmkKHXiE0qAzF2Gj5+DfDsFj1u.RO2aF2HRraj3vyW4MVgWHKXXotNTJzkznwddC0nFJa2X1UvHCRr1h1utWuNA3eG9FeerbmZC35345A5aB9wfJ63F.Smy0bl7bs9pSTgi.P1tvlBs6ZfHgqwXTlhaEZU6VgF10CKE2pSvhJAQcBzy+iC8+S+lQcWf28mHksQNcmGUbai9EkjB1BxbYV3FacoNmehTDofvKQQq0I22cYHf6Dzhif2.gsPS9zi.rS0IYIS.U1.rQKxnyTgOHtKvTJ5wvmZTFag3+U+uI6qhv0KEV3+Tx6tc+HCGcKAX+ZWwQt3EmnUHQ6Vq0vYs+ZJGptSWPU5d3apxj.s5BsEdmpcdx3+I+f+onEK1pLGZLZoDLaUraAg49LrsJKdNX5fooLCVqHNAc6wxCdbik7hhSME0pwJg8cIPI8HsLzMt4Ne2gXRY00MNWhPTUa9v7yJGlqJtDQnaVdcsljmB0WdR90wmxrrJmg9EiUBXrBWJQOE9HtbsXSQSuSgzqr5jbcKuVIzu3QF5aHTOJGi3J2geGODyx44gGwtv3Tm988eg+K8Ox+UjpAWLvGb7wG+4h852Y+Et4TGlIY1auN08tQo.7x7V6vb6oToB6p5uq7D1w16d2w9Xg3y8lJr7kaGiM1BFwqn+OvX4KSei2YKV.b6F.tu2neaWeF5AB+unyrBUzDl0Hbs.WjEOCuo4.FckBjot1hFtV8B5dNZWEXFnByI9L9qTXeGMsTX+JgXyE2n+.uX.w812WlyAwjJ+o9l32bfzAaYlHFeJ9Cb9sc0cL7E6pgubWM7nc0vWsqF95c0vueWM7GdXCceozIYVcbwXCgLY5Y46vnzyTLrCLuak72.olH.iC
-
@d-healey said in Dropdown colours?:
but look at what happens if you do anything other than fillAll...
HiseSnippet 920.3ocsVstaaaCElzNpaV6BRA1Cff+kMfmgca5Efhg4Xm3BiljZTmUj+UPSQKyFIRAJplXLz2s8Fs8Fzcnnt4UmhLuUY.Kbt7Q9cN7bNTyURJKIQpP3VWtIlgveuyhMB85IqIbAZ1IH7O5bNIQyTdVUi2DSRRX9HLt4KMJvsN.k87W+5XRHQPYUpPn2J4T1Y7HttR67QuhGFNk3ytjGUy6iFMiJESjgxTfOMcFfhIzqIArKHF2Z3fvO3TetVpVnIZVBBevXo+lEqk2Hr9+VdBeYHyHLDs.VHq5oxPeCiMZQSVyC8mWD2IHXUlWkEZZyB+jy4bedo9prwgYF7pPTOefarM8ZtE8FVmdCpQucPIbMJcfkROzYAUwi0UVL746blIfCmUDHsWmJVeQM7Z5LQBdHz8iHWylp.gRDcd5fA87f+59BWWH0mn8nxnkxwxa89EuBbTECBmyjTR3YR40GK7mxXgcrXrd2WwB3lhjooBplKEcZ6qH2LI2b6ddqJLDzySt78cc+c2VA8WA0AGGF1AzzeYf8jGVWvRBSaEyroY2pqa0r3GGxCDL+KASk9js18I.g640lBjWw7aCP938frykwowmyDoight.kLU3em7da1sMyMwzaXTKoLT4e69OSyhtic17q9taekz+l0bM6+Tpwb1+ABzjmSxg0J.BL6WTrT.BcZW5gAsaojgUeVMRQH28EEQimTbgTydsniMf9nq2+zzpU6zlgMJYXHSsSylQIpuDvNhznkLUOHLCSYkNB8Wa2z5b2Ms0moPsImZNJEyDb8qiYh6ZRCJOiZZvyYE3pNq89v716hDJh6a5tKyunLZWMr7vQnea1IDMoXwf0E1qXlRyMgA9D1GfQu1YGsbNgkbsVFm4a9QIB+M2ys91xs8OtZzlJNb0nHBXyA6.BPEXThA2P2G49X2ibeBpnw.P7ftc+yOYm9+YS1fYpR+zPhd6AslaWxM.GjaMcyLASjv0ape6y+aSeuuT7gNy4Z55cywF6fivQ0WCNlem0O3b5pUvfmJBdfyzq95bAE5MxTMWDbNQq3lRfKRiV.mzTFr6BAKzzHgaXJ4sxCLxlLvBlvOS3SvStwgFYbtwgEFQQDpR9NpsQwbq32loA3jH6CBZAeYBH6U1a33Ln+.TDbA86nTS3+yPW3tw7n8.yi2CLGsGXdxdf4o6AlmsGXd9WDi4aiNNUKirsCfh4mlMiBiOUPfJqrpPzee.MyeF
-
-
@d-healey said in Dropdown colours?:
Console.print(trace(obj));
;)Have you disabled the undefined variable warnings?
nope I havent...meanwhile this...even with fillAll
HiseSnippet 917.3ocsV01aSjCD1aR2plE3DHcesRqxmRkBQIjxKRnSjlzFTDsknK8P8aHGuNaL0q8JudoMBw+s6mz8O.FuuGHEUxA4CsZd4wyyLimw6TkjPihjJjUiKVERQV22d1Jgd4nkXl.M4Xj0eXeFNRSUtopFtJDGEQ8PVV0esQgUicPI+9uWMDywBBsTEB8NIiPOkEvzkZmN3MLNeL1idAKnh2GNXBQJFI4xXfO0s6hBwjqv9zywF2pYir18DOlVplowZZDxZmgRuUyVJuVj5+6XQr4bpQnGZFbPopGK4dFFazhFsjw8llm2QH3TlVVEpmVE9S6yXdrB8kUiGlXvsDQ05gUs0oW80nWupzqaE5sAJYUgR6jRoGYOinXg5RKF9bO6IBn4r.Ck8pTI0WTscqaORBdHzcBvWQGq.gBDsdV2tscg+bvKcbfRej1kHClKGJuw8ubywQTTHcNURv7SkxqNR3MlR4sRwj5cGE0mYtjLNVPzLonUSOE95QYla11cQtA+1tx4e3.mO4zvuyB3dvQbdKPSm49ocd3bAKQTcpXhMM8FcUqlC+HNyWP8t.LU3SxY2ACDtsaSBPdE0qI.4y2AxNUFFGdFUDODtz4qjwBu6DuYZZPA294hzD.5sFixJP5+h5b8RHV+uJ.lN7GwvnbFA6UoM6ahWPnT.BsZV3gAsSgjgUe2Mg7z8fWlmItRw4RM8shVIIiymcb+VSKVrQaF1njbNUsQylEFpeDvVh3f4TUaHM4wzBGgon0GMsu8QypaNHoEmJNJESDL8aCohaaeBJqhZFiyXE3pNYH9gYCw4ETDyyLCWTeQIztbk3dCP+yjiwZb9gAmKDqPpRyLog0wzOBKXS2Pzv9XZzUZYXhuYsRj0d2wPeSQX+2KGrpjCWNH.C1rsrAAys8HCtdNOwouygNOEkO3BH1c+82+KnL2J01ue+rM+e2VMXepzKli0quj07xRlAn8t1lMy1KQDSup5KO+x17dWo3irmxzjkali01.GgF3uCNl8d0CrOYwBJQWRvcrGe4umGmP+sLVyD9mg0Jl4hw4wAyfNMgBQWHnby3kUMyfPpbWiroBLiJ7RD9B7KyXOirUlwd4FQAXhR9dR53i4Ew8Rz.bRj7w.MfuJAjcKlXrs61oKJ.db98DhI8eLLatYLOYKvzeKvb3Vf4oaAlmsEXd9Vf4E+PLluK5nXsLHcb.TL8jjMWVVmHvvMqjagnuBnvLueH
-
@Lindon I refer you to my previous post
-
@d-healey so..
whats wrong with this statement then:g.fillAll(Colours.withAlpha(Colours.red,0.1));
- should be pretty transparent no? - its not.
-
@Lindon Yeah you can't do transparency with it because it has a solid white background by default. So it's as if your always drawing over a white rectangle.
-
@d-healey said in Dropdown colours?:
@Lindon Yeah you can't do transparency with it because it has a solid white background by default. So it's as if your always drawing over a white rectangle.
--thank you - my point exactly - you cant do anything except set the colour (and without transparency....)
-
@Lindon You can draw icons, shapes and text. The only thing you can't do is set a transparent colour. Looking at the source code I think this is because HISE is just adding to JUCE's default laf rather than replacing it.
-
@d-healey said in Dropdown colours?:
@Lindon You can draw icons, shapes and text. The only thing you can't do is set a transparent colour. Looking at the source code I think this is because HISE is just adding to JUCE's default laf rather than replacing it.
yeah - I wanted to replace the background completely- for a funky alternative drop down design- but I discovered this limitation - still I've lived with it for a couple of years _ I guess its not that important to me...
-
@Lindon You can do it but you'll need to modify the JUCE function (probably just commenting out a line).
-
@d-healey yeah might get around to it if I ever see the bottom of the to-do list....;-)
-
@Lindon Hey, just ran into this.
Do you know if there have been any threads on workarounds for this? What is the specific change to the source code?
-
@Noahdeetz said in Dropdown colours?:
@Lindon Hey, just ran into this.
Do you know if there have been any threads on workarounds for this? What is the specific change to the source code?
my specific change was to change my mind - and not do it :-)
-
@d-healey Thnx for sharing!
I also have this issue.