Skip to content

Commit 107e20c

Browse files
committed
Merge branch 'main' into devlopment
2 parents 32280b7 + 2e94b17 commit 107e20c

File tree

4 files changed

+46
-7
lines changed

4 files changed

+46
-7
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,4 +108,4 @@ set(NEPDATE_CALENDAR_RESOURCES
108108
add_nepdate_executable(nepdate_calendar "${NEPDATE_CALENDAR_SOURCES}" "${NEPDATE_CALENDAR_HEADERS}" "${NEPDATE_CALENDAR_FORMS}" "${NEPDATE_CALENDAR_RESOURCES}")
109109

110110
# Set the output name to nepdate-calendar
111-
set_target_properties(nepdate_calendar PROPERTIES OUTPUT_NAME nepdate_calendar)
111+
set_target_properties(nepdate_calendar PROPERTIES OUTPUT_NAME nepdate-calendar)

calendarwindow.cpp

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,17 @@ CalendarWindow::CalendarWindow(QWidget *parent) :
2020
blockSignals(false)
2121
{
2222
ui->setupUi(this);
23+
24+
// Apply the custom font
25+
int fontId = QFontDatabase::addApplicationFont(":/resources/Laila-Medium.ttf");
26+
if (fontId != -1) {
27+
QString fontFamily = QFontDatabase::applicationFontFamilies(fontId).at(0);
28+
QFont appFont(fontFamily);
29+
qApp->setFont(appFont);
30+
}
31+
2332
this->setWindowTitle("नेपाली पात्रो तथा मिति परिवर्तक");
2433
connect(ui->aboutbutton, &QPushButton::clicked, this, &CalendarWindow::showMenu);
25-
// Center the window on the screen
2634
centerOnScreen();
2735
installEventFilter(this);
2836

@@ -33,11 +41,6 @@ CalendarWindow::CalendarWindow(QWidget *parent) :
3341
file.close();
3442
}
3543

36-
int fontId = QFontDatabase::addApplicationFont(":/resources/Laila-Medium.ttf");
37-
QString fontFamily = QFontDatabase::applicationFontFamilies(fontId).at(0);
38-
QFont appFont(fontFamily);
39-
CalendarWindow::setFont(appFont);
40-
4144
// Initialize current date to today's date
4245
QDate currentDate = QDate::currentDate();
4346
// Populate AD combo boxes

resources.qrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,6 @@
1010
<file>resources/VERSION.txt</file>
1111
<file>resources/Laila-Medium.ttf</file>
1212
<file>resources/flag.png</file>
13+
<file>resources/Laila-Font-LICENSE</file>
1314
</qresource>
1415
</RCC>

resources/Laila-Font-LICENSE

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
Laila
2+
Designed by Indian Type Foundry
3+
4+
License
5+
Copyright (c) 2014, Indian Type Foundry ([email protected]).
6+
This Font Software is licensed under the SIL Open Font License, Version 1.1. This license is included below and is also available with a FAQ at: https://openfontlicense.org
7+
8+
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
9+
10+
PREAMBLE
11+
The goals of the Open Font License (OFL) are to stimulate worldwide development of collaborative font projects, to support the font creation efforts of academic and linguistic communities, and to provide a free and open framework in which fonts may be shared and improved in partnership with others.
12+
13+
The OFL allows the licensed fonts to be used, studied, modified, and redistributed freely as long as they are not sold by themselves. The fonts, including any derivative works, can be bundled, embedded, redistributed, and/or sold with any software provided that any reserved names are not used by derivative works. The fonts and derivatives, however, cannot be released under any other type of license. The requirement for fonts to remain under this license does not apply to any document created using the fonts or their derivatives.
14+
15+
DEFINITIONS
16+
17+
"Font Software" refers to the set of files released by the Copyright Holder(s) under this license and clearly marked as such.
18+
"Reserved Font Name" refers to any names specified as such after the copyright statement(s).
19+
"Original Version" refers to the collection of Font Software components as distributed by the Copyright Holder(s).
20+
"Modified Version" refers to any derivative made by adding to, deleting, or substituting any of the components of the Original Version, by changing formats, or by porting the Font Software to a new environment.
21+
"Author" refers to any designer, engineer, programmer, technical writer, or other person who contributed to the Font Software.
22+
PERMISSION & CONDITIONS
23+
Permission is granted, free of charge, to any person obtaining a copy of the Font Software, to use, study, copy, merge, embed, modify, redistribute, and sell modified and unmodified copies of the Font Software, subject to the following conditions:
24+
25+
The Font Software, or any of its components, in Original or Modified Versions, may not be sold by itself.
26+
Copies of the Font Software may be bundled, redistributed, and/or sold with any software, provided that each copy includes the copyright notice and this license.
27+
No Modified Version of the Font Software may use the Reserved Font Name(s) without explicit permission.
28+
The names of the Copyright Holder(s) or Author(s) may not be used to promote or endorse any Modified Version without explicit permission.
29+
The Font Software, modified or unmodified, must remain under this license.
30+
TERMINATION
31+
This license becomes null and void if any of the above conditions are not met.
32+
33+
DISCLAIMER
34+
THE FONT SOFTWARE IS PROVIDED "AS IS," WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT.
35+

0 commit comments

Comments
 (0)