Skip to content

Commit

Permalink
panchang@india: Minor bug fix and style improvement (#1219)
Browse files Browse the repository at this point in the history
  • Loading branch information
OnlineLearningTutorials authored Jul 3, 2024
1 parent bdcbfed commit 850df94
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 12 deletions.
10 changes: 5 additions & 5 deletions panchang@india/files/panchang@india/desklet.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ MyDesklet.prototype = {
_init: function(metadata) {
Desklet.Desklet.prototype._init.call(this, metadata);

this._mainContainer = new St.BoxLayout({ vertical: false });
this._mainContainer = new St.BoxLayout({ vertical: false, style_class: 'main_container' });

this._calenderContainer = new St.BoxLayout({ vertical: true, style_class: 'calender-container' });
this._panchangContainer = new St.BoxLayout({ vertical: true, style_class: 'panchang-container' });
Expand All @@ -45,8 +45,8 @@ MyDesklet.prototype = {
this._timeContainer.add(this._time);

this._calenderContainer.add(this._dateContainer, { x_fill: true });
this._calenderContainer.add(this._monthContainer);
this._calenderContainer.add(this._timeContainer);
this._calenderContainer.add(this._monthContainer, { x_fill: true});
this._calenderContainer.add(this._timeContainer, { x_fill: true});

this._panchangContainer.add(this._vaaram);
this._panchangContainer.add(this._tithi);
Expand Down Expand Up @@ -674,14 +674,14 @@ function tithi_end(jd, n1, len) {
knv = Math.floor(((jd - 2415020) / 365.25) * 12.3685);
itit = n1 + 1;
aspect = len * itit; // sun n moon in the early tithi
if (aspect == 0) {
/*if (aspect == 0) {
jdt = novolun(jd, knv);
flag = 1;
}
if (aspect == 360) {
jdt = novolun(jd, (knv + 1));
flag = 1;
}
}*/
while (flag < 1) {
Lsun0 = sun(jdt);
Lmoon0 = moon(jdt);
Expand Down
3 changes: 2 additions & 1 deletion panchang@india/files/panchang@india/metadata.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"description": "Displaying Hindu Panchnage",
"uuid": "panchang@india",
"name": "Panchang Desklet"
"name": "Panchang Desklet",
"version": "1.1"
}
19 changes: 13 additions & 6 deletions panchang@india/files/panchang@india/stylesheet.css
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,24 +1,31 @@
.main_container {
background-color: rgba(0,0,0,0.4);
border: 1px solid black;
border-radius: 10px;
padding: 10px;
}

.calender-container {
padding: 0 10px;
text-align: center;
}

.date-container {
font-size: 48px;
color: red;
text-align: justify;
color: pink;
text-align: right;
}

.month-container {
font-size: 18px;
color: red;
font-size: 16px;
color: pink;
text-align: right;
}

.time-container {
font-size: 24px;
font-size: 20px;
color: pink;
text-align: center;
text-align: right;
}


Expand Down

0 comments on commit 850df94

Please sign in to comment.