mirror of
https://github.com/xlmnxp/blue-recorder.git
synced 2024-11-23 09:03:10 +03:00
update ui
This commit is contained in:
parent
5af98f9508
commit
4e4756e88a
@ -380,6 +380,29 @@
|
||||
</layout>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkCheckButton" id="hideswitch">
|
||||
<property name="label" translatable="yes">checkbutton</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">True</property>
|
||||
<property name="receives-default">False</property>
|
||||
<property name="active">False</property>
|
||||
<layout>
|
||||
<property name="column">0</property>
|
||||
<property name="row">2</property>
|
||||
</layout>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkSeparator" id="followmouse-separator">
|
||||
<property name="visible">True</property>
|
||||
<property name="opacity">0.0</property>
|
||||
<layout>
|
||||
<property name="column">1</property>
|
||||
<property name="row">2</property>
|
||||
</layout>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
@ -432,6 +455,16 @@
|
||||
</layout>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkSeparator" id="delay-separator">
|
||||
<property name="visible">True</property>
|
||||
<property name="opacity">0.0</property>
|
||||
<layout>
|
||||
<property name="column">1</property>
|
||||
<property name="row">2</property>
|
||||
</layout>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
|
@ -53,7 +53,7 @@ fn default() {
|
||||
set("default", "audiocheck", "1");
|
||||
set("default", "mousecheck", "1");
|
||||
set("default", "followmousecheck", "0");
|
||||
set("default", "overwritecheck", "0");
|
||||
set("default", "hidecheck", "0");
|
||||
}
|
||||
|
||||
fn merge_previous_version() -> Option<PathBuf> {
|
||||
|
10
src/main.rs
10
src/main.rs
@ -90,6 +90,7 @@ pub fn build_ui(application: &Application) {
|
||||
let format_chooser_combobox: ComboBoxText = builder.object("comboboxtext1").unwrap();
|
||||
let frames_label: Label = builder.object("frames_label").unwrap();
|
||||
let frames_spin: SpinButton = builder.object("frames").unwrap();
|
||||
let hide_switch: CheckButton = builder.object("hideswitch").unwrap();
|
||||
let mouse_switch: CheckButton = builder.object("mouseswitch").unwrap();
|
||||
let play_button: Button = builder.object("playbutton").unwrap();
|
||||
let record_button: Button = builder.object("recordbutton").unwrap();
|
||||
@ -181,10 +182,12 @@ pub fn build_ui(application: &Application) {
|
||||
audio_switch.set_label(Some(&gettext("Record Audio")));
|
||||
mouse_switch.set_label(Some(&gettext("Show Mouse")));
|
||||
follow_mouse_switch.set_label(Some(&gettext("Follow Mouse")));
|
||||
hide_switch.set_label(Some(&gettext("Auto Hide")));
|
||||
video_switch.set_active(config_management::get_bool("default", "videocheck"));
|
||||
audio_switch.set_active(config_management::get_bool("default", "audiocheck"));
|
||||
mouse_switch.set_active(config_management::get_bool("default", "mousecheck"));
|
||||
follow_mouse_switch.set_active(config_management::get_bool("default", "followmousecheck"));
|
||||
hide_switch.set_active(config_management::get_bool("default", "hidecheck"));
|
||||
|
||||
let _video_switch = video_switch.clone();
|
||||
let _audio_switch = audio_switch.clone();
|
||||
@ -223,6 +226,9 @@ pub fn build_ui(application: &Application) {
|
||||
follow_mouse_switch.connect_toggled(|switch: &CheckButton| {
|
||||
config_management::set_bool("default", "followmousecheck", switch.is_active());
|
||||
});
|
||||
hide_switch.connect_toggled(|switch: &CheckButton| {
|
||||
config_management::set_bool("default", "hidecheck", switch.is_active());
|
||||
});
|
||||
|
||||
match dark_light::detect() {
|
||||
// Dark mode
|
||||
@ -521,7 +527,9 @@ pub fn build_ui(application: &Application) {
|
||||
_ => {
|
||||
start_timer(record_time_label.clone());
|
||||
record_time_label.set_visible(true);
|
||||
_main_window.minimize();
|
||||
if hide_switch.is_active() {
|
||||
_main_window.minimize();
|
||||
}
|
||||
_play_button.hide();
|
||||
_record_button.hide();
|
||||
_stop_button.show();
|
||||
|
Loading…
Reference in New Issue
Block a user