mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-08-07 22:14:00 -06:00
tweak plate name location for Mac and Linux
This commit is contained in:
parent
166890db53
commit
814de36768
3 changed files with 10 additions and 2 deletions
|
@ -1561,7 +1561,12 @@ void PartPlate::generate_plate_name_texture()
|
|||
m_name_texture.reset();
|
||||
auto text = m_name.empty()? _L("Untitled") : m_name;
|
||||
wxCoord w, h;
|
||||
#ifdef WIN32
|
||||
auto* font = &Label::Head_48;
|
||||
#else
|
||||
auto* font = &Label::Head_32;
|
||||
#endif
|
||||
|
||||
wxColour foreground(0xf2, 0x75, 0x4e, 0xff);
|
||||
if (!m_name_texture.generate_from_text_string(text.ToStdString(), *font, *wxBLACK, foreground))
|
||||
BOOST_LOG_TRIVIAL(error) << "PartPlate::generate_plate_name_texture(): generate_from_text_string() failed";
|
||||
|
|
|
@ -22,6 +22,7 @@ wxFont Label::sysFont(int size, bool bold)
|
|||
return font;
|
||||
}
|
||||
wxFont Label::Head_48;
|
||||
wxFont Label::Head_32;
|
||||
wxFont Label::Head_24;
|
||||
wxFont Label::Head_20;
|
||||
wxFont Label::Head_18;
|
||||
|
@ -55,6 +56,8 @@ void Label::initSysFont()
|
|||
printf("add font of HarmonyOS_Sans_SC_Regular returns %d\n", result);
|
||||
#endif
|
||||
|
||||
Head_48 = Label::sysFont(48, true);
|
||||
Head_32 = Label::sysFont(32, true);
|
||||
Head_24 = Label::sysFont(24, true);
|
||||
Head_20 = Label::sysFont(20, true);
|
||||
Head_18 = Label::sysFont(18, true);
|
||||
|
@ -65,7 +68,6 @@ void Label::initSysFont()
|
|||
Head_12 = Label::sysFont(12, true);
|
||||
Head_10 = Label::sysFont(10, true);
|
||||
|
||||
Head_48 = Label::sysFont(48, true);
|
||||
Body_16 = Label::sysFont(16, false);
|
||||
Body_15 = Label::sysFont(15, false);
|
||||
Body_14 = Label::sysFont(14, false);
|
||||
|
|
|
@ -25,6 +25,8 @@ private:
|
|||
wxColour color;
|
||||
|
||||
public:
|
||||
static wxFont Head_48;
|
||||
static wxFont Head_32;
|
||||
static wxFont Head_24;
|
||||
static wxFont Head_20;
|
||||
static wxFont Head_18;
|
||||
|
@ -35,7 +37,6 @@ public:
|
|||
static wxFont Head_12;
|
||||
static wxFont Head_10;
|
||||
|
||||
static wxFont Head_48;
|
||||
static wxFont Body_16;
|
||||
static wxFont Body_15;
|
||||
static wxFont Body_14;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue