mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-03-31 16:45:27 +00:00
operate with progressbar transparency, do not hide block with fixed height to prevent content block jumps
This commit is contained in:
parent
49ec6ee23d
commit
f6c2ca475d
1 changed files with 7 additions and 8 deletions
|
|
@ -31,10 +31,9 @@ class Progressbar
|
||||||
// Init container
|
// Init container
|
||||||
$this->gtk = new GtkProgressBar;
|
$this->gtk = new GtkProgressBar;
|
||||||
|
|
||||||
/* Prevent global initiation
|
$this->gtk->show(); // fixed block height, show always
|
||||||
$this->gtk->set_no_show_all(
|
|
||||||
true
|
$this->gtk->set_opacity(0); // init transparently
|
||||||
);*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function start(): void
|
public function start(): void
|
||||||
|
|
@ -49,14 +48,14 @@ class Progressbar
|
||||||
|
|
||||||
public function show(): void
|
public function show(): void
|
||||||
{
|
{
|
||||||
$this->gtk->show(); // | set_opacity(1)
|
$this->gtk->set_opacity(1); // fixed block height, do not show()
|
||||||
}
|
}
|
||||||
|
|
||||||
public function hide(): void
|
public function hide(): void
|
||||||
{
|
{
|
||||||
$this->stop(); // make sure iterator get stopped
|
$this->stop(); // make sure iterator get stopped
|
||||||
|
|
||||||
$this->gtk->hide(); // | set_opacity(0)
|
$this->gtk->set_opacity(0); // fixed block height, do not hide()
|
||||||
}
|
}
|
||||||
|
|
||||||
public function infinitive(
|
public function infinitive(
|
||||||
|
|
@ -67,7 +66,7 @@ class Progressbar
|
||||||
// Init visible
|
// Init visible
|
||||||
if ($show)
|
if ($show)
|
||||||
{
|
{
|
||||||
$this->gtk->show();
|
$this->show();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Activate iterator
|
// Activate iterator
|
||||||
|
|
@ -100,7 +99,7 @@ class Progressbar
|
||||||
// Init visible
|
// Init visible
|
||||||
if ($show)
|
if ($show)
|
||||||
{
|
{
|
||||||
$this->gtk->show();
|
$this->show();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Activate iterator
|
// Activate iterator
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue