I thought for most application frameworks, simply
not doing anything is enough to make your application adopt the user's system preferences. You have to take deliberate action as a developer to override them.
I remember the early days of Windows 95, where for a brief, glorious moment in time, all your applications would look like proper Windows 95 applications, respecting your color scheme, text size and font face, highlight/disable behavior, tooltip/hover behavior and colors, everything. Everything you launched just looked like it fit in with the rest of the system. Then, I think one of the first (at least most prominent) egregious violators was WinAmp. You'd launch it and it just decided by itself what the title bar, status bar, min/max/close buttons, content, everything, should look like. And not just colors--they used bitmap graphics to entirely override what common controls looked like. It stuck out on your desktop like a sore thumb. Yuck! If you wanted to change its appearance, you had to use the application's own plugin or theming system since it just ignored the system.
Fast forward to today, and every developer just treats the application's entire visual surface as their own art project, basically ignoring the system preferences altogether. If you're lucky, they let you specify "dark" vs. "light" or even more rarely, let you go in and do minor tweaks using the app's own bespoke preference settings. But fallback to system colors? Fuggetaboutit!