Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Tractor
carburetor
Commits
57e776d1
Verified
Commit
57e776d1
authored
Oct 30, 2022
by
Danial Behzadi
Browse files
move progressbar to overlay
parent
bde56fe2
Pipeline
#545039
passed with stage
in 13 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
carburetor/actions.py
View file @
57e776d1
...
...
@@ -82,6 +82,8 @@ def on_connect(*argv) -> None:
app
=
argv
[
2
]
button
=
ui
.
get
(
"SplitButton"
)
button
.
set_sensitive
(
False
)
overlay
=
ui
.
get
(
"ProgressOverlay"
)
overlay
.
show
()
cancel_button
=
ui
.
get
(
"CancelButton"
)
cancel_button
.
set_visible
(
True
)
page
=
ui
.
get
(
"MainPage"
)
...
...
@@ -161,9 +163,10 @@ def set_progress(percentage: int) -> None:
set progressbar percentage
"""
bar
=
ui
.
get
(
"ProgressBar"
)
fraction
=
float
(
percentage
)
/
100
fraction
=
float
(
percentage
)
/
100
bar
.
set_fraction
(
fraction
)
def
notify
(
app
)
->
None
:
"""
show notification
...
...
@@ -229,6 +232,8 @@ def set_run_status(app=None) -> None:
set_to_stopped
(
app
)
button
=
ui
.
get
(
"SplitButton"
)
button
.
set_sensitive
(
True
)
overlay
=
ui
.
get
(
"ProgressOverlay"
)
overlay
.
hide
()
def
is_proxy_set
()
->
bool
:
...
...
carburetor/ui/main.ui
View file @
57e776d1
...
...
@@ -51,8 +51,12 @@ along with Carburetor. If not, see <http://www.gnu.org/licenses/>. -->
</object>
</child>
<child>
<object
class=
"GtkProgressBar"
id=
"ProgressBar"
>
<!--<property name="css-classes">osd</property>-->
<object
class=
"GtkOverlay"
id=
"ProgressOverlay"
>
<child>
<object
class=
"GtkProgressBar"
id=
"ProgressBar"
>
<!--<property name="css-classes">osd</property>-->
</object>
</child>
</object>
</child>
<child>
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment