mirror of
https://github.com/chibicitiberiu/rainmeter-studio.git
synced 2024-02-24 04:33:31 +00:00
Fixed Bar/Histogram meters containing wrong width/height values when used with images
This commit is contained in:
parent
e2ce7d59a7
commit
90c81e01d1
@ -292,7 +292,7 @@ void CMeter::ReadOptions(CConfigParser& parser, const WCHAR* section)
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool oldWDefined = m_WDefined;
|
bool oldWDefined = m_WDefined;
|
||||||
m_W = parser.ReadInt(section, L"W", m_W);
|
m_W = IsFixedSize(true) ? parser.ReadInt(section, L"W", m_W) : m_W;
|
||||||
m_WDefined = parser.GetLastValueDefined();
|
m_WDefined = parser.GetLastValueDefined();
|
||||||
if (!m_WDefined && oldWDefined && IsFixedSize())
|
if (!m_WDefined && oldWDefined && IsFixedSize())
|
||||||
{
|
{
|
||||||
@ -300,7 +300,7 @@ void CMeter::ReadOptions(CConfigParser& parser, const WCHAR* section)
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool oldHDefined = m_HDefined;
|
bool oldHDefined = m_HDefined;
|
||||||
m_H = parser.ReadInt(section, L"H", m_H);
|
m_H = IsFixedSize(true) ? parser.ReadInt(section, L"H", m_H) : m_H;
|
||||||
m_HDefined = parser.GetLastValueDefined();
|
m_HDefined = parser.GetLastValueDefined();
|
||||||
if (!m_HDefined && oldHDefined && IsFixedSize())
|
if (!m_HDefined && oldHDefined && IsFixedSize())
|
||||||
{
|
{
|
||||||
|
@ -120,7 +120,7 @@ protected:
|
|||||||
virtual void ReadOptions(CConfigParser& parser, const WCHAR* section);
|
virtual void ReadOptions(CConfigParser& parser, const WCHAR* section);
|
||||||
virtual void BindMeasures(CConfigParser& parser, const WCHAR* section);
|
virtual void BindMeasures(CConfigParser& parser, const WCHAR* section);
|
||||||
|
|
||||||
virtual bool IsFixedSize() { return true; }
|
virtual bool IsFixedSize(bool overwrite = false) { return true; }
|
||||||
|
|
||||||
bool BindPrimaryMeasure(CConfigParser& parser, const WCHAR* section, bool optional);
|
bool BindPrimaryMeasure(CConfigParser& parser, const WCHAR* section, bool optional);
|
||||||
void BindSecondaryMeasures(CConfigParser& parser, const WCHAR* section);
|
void BindSecondaryMeasures(CConfigParser& parser, const WCHAR* section);
|
||||||
|
@ -37,7 +37,7 @@ public:
|
|||||||
protected:
|
protected:
|
||||||
virtual void ReadOptions(CConfigParser& parser, const WCHAR* section);
|
virtual void ReadOptions(CConfigParser& parser, const WCHAR* section);
|
||||||
|
|
||||||
virtual bool IsFixedSize() { return m_ImageName.empty(); }
|
virtual bool IsFixedSize(bool overwrite = false) { return m_ImageName.empty(); }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
enum ORIENTATION
|
enum ORIENTATION
|
||||||
|
@ -46,7 +46,7 @@ protected:
|
|||||||
virtual void ReadOptions(CConfigParser& parser, const WCHAR* section);
|
virtual void ReadOptions(CConfigParser& parser, const WCHAR* section);
|
||||||
virtual void BindMeasures(CConfigParser& parser, const WCHAR* section);
|
virtual void BindMeasures(CConfigParser& parser, const WCHAR* section);
|
||||||
|
|
||||||
virtual bool IsFixedSize() { return false; }
|
virtual bool IsFixedSize(bool overwrite = false) { return overwrite; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool HitTest2(int px, int py, bool checkAlpha);
|
bool HitTest2(int px, int py, bool checkAlpha);
|
||||||
|
@ -38,7 +38,7 @@ protected:
|
|||||||
virtual void ReadOptions(CConfigParser& parser, const WCHAR* section);
|
virtual void ReadOptions(CConfigParser& parser, const WCHAR* section);
|
||||||
virtual void BindMeasures(CConfigParser& parser, const WCHAR* section);
|
virtual void BindMeasures(CConfigParser& parser, const WCHAR* section);
|
||||||
|
|
||||||
virtual bool IsFixedSize() { return m_PrimaryImageName.empty(); }
|
virtual bool IsFixedSize(bool overwrite = false) { return m_PrimaryImageName.empty(); }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void DisposeBuffer();
|
void DisposeBuffer();
|
||||||
|
@ -38,7 +38,7 @@ protected:
|
|||||||
virtual void ReadOptions(CConfigParser& parser, const WCHAR* section);
|
virtual void ReadOptions(CConfigParser& parser, const WCHAR* section);
|
||||||
virtual void BindMeasures(CConfigParser& parser, const WCHAR* section);
|
virtual void BindMeasures(CConfigParser& parser, const WCHAR* section);
|
||||||
|
|
||||||
virtual bool IsFixedSize() { return m_ImageName.empty(); }
|
virtual bool IsFixedSize(bool overwrite = false) { return m_ImageNameResult.empty(); }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void LoadImage(const std::wstring& imageName, bool bLoadAlways);
|
void LoadImage(const std::wstring& imageName, bool bLoadAlways);
|
||||||
|
@ -47,7 +47,7 @@ protected:
|
|||||||
virtual void ReadOptions(CConfigParser& parser, const WCHAR* section);
|
virtual void ReadOptions(CConfigParser& parser, const WCHAR* section);
|
||||||
virtual void BindMeasures(CConfigParser& parser, const WCHAR* section);
|
virtual void BindMeasures(CConfigParser& parser, const WCHAR* section);
|
||||||
|
|
||||||
virtual bool IsFixedSize() { return false; }
|
virtual bool IsFixedSize(bool overwrite = false) { return overwrite; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
enum TEXTSTYLE
|
enum TEXTSTYLE
|
||||||
|
Loading…
Reference in New Issue
Block a user