mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-28 17:32:29 +01:00
changed default fonts
improved font selection in wprefs
This commit is contained in:
@@ -325,13 +325,20 @@ static void
|
|||||||
selectedFamily(WMWidget *w, void *data)
|
selectedFamily(WMWidget *w, void *data)
|
||||||
{
|
{
|
||||||
_Panel *panel= (_Panel*)data;
|
_Panel *panel= (_Panel*)data;
|
||||||
WMListItem *item= WMGetListSelectedItem(panel->familyL);
|
WMListItem *item;
|
||||||
|
FontStyle *oldStyle= NULL;
|
||||||
char buffer[1024];
|
char buffer[1024];
|
||||||
|
|
||||||
|
item= WMGetListSelectedItem(panel->styleL);
|
||||||
|
if (item)
|
||||||
|
oldStyle= (FontStyle*)item->clientData;
|
||||||
|
|
||||||
|
item= WMGetListSelectedItem(panel->familyL);
|
||||||
|
|
||||||
if (item)
|
if (item)
|
||||||
{
|
{
|
||||||
FontFamily *family= (FontFamily*)item->clientData;
|
FontFamily *family= (FontFamily*)item->clientData;
|
||||||
int i;
|
int i, oldi= 0, oldscore= 0;
|
||||||
|
|
||||||
WMClearList(panel->styleL);
|
WMClearList(panel->styleL);
|
||||||
for (i = 0; i < family->stylen; i++)
|
for (i = 0; i < family->stylen; i++)
|
||||||
@@ -367,8 +374,25 @@ selectedFamily(WMWidget *w, void *data)
|
|||||||
|
|
||||||
item= WMAddListItem(panel->styleL, buffer);
|
item= WMAddListItem(panel->styleL, buffer);
|
||||||
item->clientData= family->styles+i;
|
item->clientData= family->styles+i;
|
||||||
|
|
||||||
|
if (oldStyle) {
|
||||||
|
int score= 0;
|
||||||
|
|
||||||
|
if (oldStyle->width == family->styles[i].width)
|
||||||
|
score |= 1;
|
||||||
|
if (oldStyle->weight == family->styles[i].weight)
|
||||||
|
score |= 2;
|
||||||
|
if (oldStyle->slant == family->styles[i].slant)
|
||||||
|
score |= 4;
|
||||||
|
|
||||||
|
if (score > oldscore)
|
||||||
|
{
|
||||||
|
oldi= i;
|
||||||
|
oldscore= score;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
WMSelectListItem(panel->styleL, 0);
|
WMSelectListItem(panel->styleL, oldi);
|
||||||
|
|
||||||
{
|
{
|
||||||
int index= WMGetPopUpButtonSelectedItem(panel->optionP);
|
int index= WMGetPopUpButtonSelectedItem(panel->optionP);
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
SystemFont = "Trebuchet MS,Luxi Sans,sans:slant=0:weight=100";
|
SystemFont = "Trebuchet MS,Luxi Sans";
|
||||||
BoldSystemFont = "Trebuchet MS,Luxi Sans,sans:slant=0:weight=200";
|
BoldSystemFont = "Trebuchet MS,Luxi Sans:bold";
|
||||||
DefaultFontSize = 12;
|
DefaultFontSize = 12;
|
||||||
AntialiasedText = No;
|
AntialiasedText = No;
|
||||||
MultiByteText = AUTO;
|
MultiByteText = AUTO;
|
||||||
|
|||||||
@@ -105,13 +105,13 @@
|
|||||||
ConstrainWindowSize = NO;
|
ConstrainWindowSize = NO;
|
||||||
ClipRaiseLowerKey = None;
|
ClipRaiseLowerKey = None;
|
||||||
TitleJustify = center;
|
TitleJustify = center;
|
||||||
WindowTitleFont = "Trebuchet MS,Luxi Sans,sans:slant=0:weight=200:pixelsize=12";
|
WindowTitleFont = "Trebuchet MS,Luxi Sans:bold:pixelsize=12";
|
||||||
MenuTitleFont = "Trebuchet MS,Luxi Sans,sans:slant=0:weight=200:pixelsize=12";
|
MenuTitleFont = "Trebuchet MS,Luxi Sans:bold:pixelsize=12";
|
||||||
MenuTextFont = "Trebuchet MS,Luxi Sans,sans:slant=0:weight=100:pixelsize=12";
|
MenuTextFont = "Trebuchet MS,Luxi Sans:pixelsize=12";
|
||||||
IconTitleFont = "Trebuchet MS,Luxi Sans,sans:slant=0:weight=100:pixelsize=8";
|
IconTitleFont = "Trebuchet MS,Luxi Sans:pixelsize=8";
|
||||||
ClipTitleFont = "Trebuchet MS,Luxi Sans,sans:slant=0:weight=200:pixelsize=10";
|
ClipTitleFont = "Trebuchet MS,Luxi Sans:bold:pixelsize=10";
|
||||||
DisplayFont = "Trebuchet MS,Luxi Sans,sans:slant=0:weight=100:pixelsize=10";
|
DisplayFont = "Trebuchet MS,Luxi Sans:pixelsize=10";
|
||||||
LargeDisplayFont = "Trebuchet MS,Luxi Sans,sans:slant=0:weight=200:pixelsize=24";
|
LargeDisplayFont = "Trebuchet MS,Luxi Sans:bold:pixelsize=24";
|
||||||
HighlightColor = white;
|
HighlightColor = white;
|
||||||
HighlightTextColor = black;
|
HighlightTextColor = black;
|
||||||
ClipTitleColor = black;
|
ClipTitleColor = black;
|
||||||
|
|||||||
@@ -269,26 +269,15 @@
|
|||||||
#define DEF_FRAME_COLOR "white"
|
#define DEF_FRAME_COLOR "white"
|
||||||
|
|
||||||
|
|
||||||
#ifdef I18N
|
#define DEF_TITLE_FONT "Trebuchet MS,Luxi Sans:bold:pixelsize=12"
|
||||||
#define DEF_TITLE_FONT "\"-*-*-medium-r-normal--14-*\""
|
#define DEF_MENU_TITLE_FONT "Trebuchet MS,Luxi Sans:bold:pixelsize=12"
|
||||||
#define DEF_MENU_TITLE_FONT "\"-*-*-medium-r-normal--14-*\""
|
#define DEF_MENU_ENTRY_FONT "Trebuchet MS,Luxi Sans:pixelsize=12"
|
||||||
#define DEF_MENU_ENTRY_FONT "\"-*-*-medium-r-normal--14-*\""
|
#define DEF_ICON_TITLE_FONT "Trebuchet MS,Luxi Sans:pixelsize=8"
|
||||||
#define DEF_ICON_TITLE_FONT "\"-*-*-medium-r-normal--10-*\""
|
#define DEF_CLIP_TITLE_FONT "Trebuchet MS,Luxi Sans:bold:pixelsize=10"
|
||||||
#define DEF_CLIP_TITLE_FONT "\"-*-*-medium-r-normal--10-*\""
|
#define DEF_INFO_TEXT_FONT "Trebuchet MS,Luxi Sans:pixelsize=12"
|
||||||
#define DEF_INFO_TEXT_FONT "\"-*-*-medium-r-normal--14-*\""
|
|
||||||
#define DEF_ADDITONAL_FONT "-*-*-medium-r-normal--12-*"
|
|
||||||
|
|
||||||
#define DEF_WORKSPACE_NAME_FONT "\"-*-*-medium-r-normal--24-*\""
|
#define DEF_WORKSPACE_NAME_FONT "Trebuchet MS,Luxi Sans:bold:pixelsize=24"
|
||||||
#else /* !I18N */
|
|
||||||
#define DEF_TITLE_FONT "\"-*-helvetica-bold-r-normal-*-12-*-*-*-*-*-*-*\""
|
|
||||||
#define DEF_MENU_TITLE_FONT "\"-*-helvetica-bold-r-normal-*-12-*-*-*-*-*-*-*\""
|
|
||||||
#define DEF_MENU_ENTRY_FONT "\"-*-helvetica-medium-r-normal-*-12-*-*-*-*-*-*-*\""
|
|
||||||
#define DEF_ICON_TITLE_FONT "\"-*-helvetica-medium-r-normal-*-8-*-*-*-*-*-*-*\""
|
|
||||||
#define DEF_CLIP_TITLE_FONT "\"-*-helvetica-bold-r-normal-*-10-*-*-*-*-*-*-*\""
|
|
||||||
#define DEF_INFO_TEXT_FONT "\"-*-helvetica-medium-r-normal-*-12-*-*-*-*-*-*-*\""
|
|
||||||
|
|
||||||
#define DEF_WORKSPACE_NAME_FONT "\"-*-lucida-bold-r-*-*-24-*-*-*-*-*-*-*\""
|
|
||||||
#endif /* !I18N */
|
|
||||||
|
|
||||||
#define DEF_FRAME_THICKNESS 1 /* linewidth of the move/resize frame */
|
#define DEF_FRAME_THICKNESS 1 /* linewidth of the move/resize frame */
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user