mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-01 17:38:41 +00:00
Improve formspec scaling (#14840)
This commit is contained in:
parent
1527cdf6a4
commit
041d67ceca
11 changed files with 176 additions and 87 deletions
|
@ -296,6 +296,11 @@ public:
|
|||
void getAndroidUIInput();
|
||||
#endif
|
||||
|
||||
// Returns the fixed formspec coordinate size for the given parameters.
|
||||
static double getFixedImgsize(double screen_dpi, double gui_scaling);
|
||||
// Returns the preferred non-fixed formspec coordinate size for the given parameters.
|
||||
static double getImgsize(v2u32 avail_screensize, double screen_dpi, double gui_scaling);
|
||||
|
||||
protected:
|
||||
v2s32 getBasePos() const
|
||||
{
|
||||
|
@ -514,6 +519,9 @@ private:
|
|||
|
||||
// used by getAbsoluteRect
|
||||
s32 m_tabheader_upper_edge = 0;
|
||||
|
||||
// Determines the size (in pixels) of formspec coordinate units.
|
||||
double calculateImgsize(const parserData &data);
|
||||
};
|
||||
|
||||
class FormspecFormSource: public IFormSource
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue