Skip to content

Commit

Permalink
Merge pull request #450 from mainmachine/bugfix/gTile-grid-panel-scaling
Browse files Browse the repository at this point in the history
gTile@shuairan: Set grid-panel width relative to table width to fix #449
  • Loading branch information
brownsr authored Jul 2, 2023
2 parents 89f7add + dffbf5a commit e9df10b
Show file tree
Hide file tree
Showing 6 changed files with 205 additions and 104 deletions.
12 changes: 11 additions & 1 deletion gTile@shuairan/files/gTile@shuairan/3.8/gTile.js
Original file line number Diff line number Diff line change
Expand Up @@ -829,6 +829,7 @@ let Grid = class Grid {
constructor(app, monitor, title, cols, rows) {
this.tableWidth = 220;
this.tableHeight = 200;
this.panelBorderOffset = 40;
this.borderwidth = 2;
this.rowKey = -1;
this.colKey = -1;
Expand All @@ -839,13 +840,19 @@ let Grid = class Grid {
this.AdjustTableSize = (width, height) => {
this.tableWidth = width;
this.tableHeight = height;
this.panelWidth = (this.tableWidth + this.panelBorderOffset);
const time = this.app.config.AnimationTime;
Grid_Tweener.addTween(this.table, {
time: time,
width: width,
height: height,
transition: 'easeOutQuad',
});
Grid_Tweener.addTween(this.actor, {
time: time,
width: this.panelWidth,
transition: 'easeOutQuad',
});
const [widthUnit, heightUnit] = this.GetTableUnits(width, height);
for (let index = 0; index < this.elements.length; index++) {
const row = this.elements[index];
Expand Down Expand Up @@ -1049,13 +1056,16 @@ let Grid = class Grid {
this.app = app;
this.tableHeight = 200;
this.tableWidth = 220;
this.panelBorderOffset = 40;
this.panelWidth = (this.tableWidth + this.panelBorderOffset);
this.borderwidth = 2;
this.actor = new BoxLayout({
vertical: true,
style_class: 'grid-panel',
reactive: true,
can_focus: true,
track_hover: true
track_hover: true,
width: this.panelWidth
});
this.actor.connect('enter-event', this.OnMouseEnter);
this.actor.connect('leave-event', this.OnMouseLeave);
Expand Down
12 changes: 11 additions & 1 deletion gTile@shuairan/files/gTile@shuairan/5.4/gTile.js
Original file line number Diff line number Diff line change
Expand Up @@ -829,6 +829,7 @@ let Grid = class Grid {
constructor(app, monitor, title, cols, rows) {
this.tableWidth = 220;
this.tableHeight = 200;
this.panelBorderOffset = 40;
this.borderwidth = 2;
this.rowKey = -1;
this.colKey = -1;
Expand All @@ -839,13 +840,19 @@ let Grid = class Grid {
this.AdjustTableSize = (width, height) => {
this.tableWidth = width;
this.tableHeight = height;
this.panelWidth = (this.tableWidth + this.panelBorderOffset);
const time = this.app.config.AnimationTime;
Grid_Tweener.addTween(this.table, {
time: time,
width: width,
height: height,
transition: 'easeOutQuad',
});
Grid_Tweener.addTween(this.actor, {
time: time,
width: this.panelWidth,
transition: 'easeOutQuad',
});
const [widthUnit, heightUnit] = this.GetTableUnits(width, height);
for (let index = 0; index < this.elements.length; index++) {
const row = this.elements[index];
Expand Down Expand Up @@ -1049,13 +1056,16 @@ let Grid = class Grid {
this.app = app;
this.tableHeight = 200;
this.tableWidth = 220;
this.panelBorderOffset = 40;
this.panelWidth = (this.tableWidth + this.panelBorderOffset);
this.borderwidth = 2;
this.actor = new BoxLayout({
vertical: true,
style_class: 'grid-panel',
reactive: true,
can_focus: true,
track_hover: true
track_hover: true,
width: this.panelWidth
});
this.actor.connect('enter-event', this.OnMouseEnter);
this.actor.connect('leave-event', this.OnMouseLeave);
Expand Down
2 changes: 1 addition & 1 deletion gTile@shuairan/files/gTile@shuairan/po/[email protected]
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-09-01 22:20+0100\n"
"POT-Creation-Date: 2023-02-03 15:24-0500\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <[email protected]>\n"
Expand Down
135 changes: 85 additions & 50 deletions gTile@shuairan/src/3_8/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit e9df10b

Please sign in to comment.