mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 824132: Persona sends a Reset message on start. [r=mfinkle]
--HG-- extra : rebase_source : e8e47801fbc3f4ec55e6d7637e4586a587cdda16
This commit is contained in:
parent
a8b5158916
commit
2fea3c89ff
@ -113,18 +113,20 @@ public class LightweightTheme implements GeckoEventListener {
|
||||
}
|
||||
|
||||
public void resetLightweightTheme() {
|
||||
// Reset the bitmap.
|
||||
mBitmap = null;
|
||||
if (mBitmap != null) {
|
||||
// Reset the bitmap.
|
||||
mBitmap = null;
|
||||
|
||||
// Post the reset on the UI thread.
|
||||
for (OnChangeListener listener : mListeners) {
|
||||
final OnChangeListener oneListener = listener;
|
||||
oneListener.post(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
oneListener.onLightweightThemeReset();
|
||||
}
|
||||
});
|
||||
// Post the reset on the UI thread.
|
||||
for (OnChangeListener listener : mListeners) {
|
||||
final OnChangeListener oneListener = listener;
|
||||
oneListener.post(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
oneListener.onLightweightThemeReset();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -162,6 +164,21 @@ public class LightweightTheme implements GeckoEventListener {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* A lightweight theme is enabled only if there is an active bitmap.
|
||||
*
|
||||
* @return True if the theme is enabled.
|
||||
*/
|
||||
public boolean isEnabled() {
|
||||
return (mBitmap != null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Based on the luminance of the domanint color, a theme is classified as light or dark.
|
||||
*
|
||||
* @return True if the theme is light.
|
||||
*/
|
||||
public boolean isLightTheme() {
|
||||
return mIsLight;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user