Animation: Fix code style (#1969)

This commit is contained in:
Leo 2024-07-08 08:59:41 +09:00 committed by GitHub
parent 563c8a0e22
commit 7b77cf979b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,22 +1,10 @@
// /*
// Copyright (C) 2014 Tom Beckmann * SPDX-License-Identifier: GPL-3.0-or-later
// * SPDX-FileCopyrightText: 2024 elementary, Inc. (https://elementary.io)
// This program is free software: you can redistribute it and/or modify * 2014 Tom Beckmann
// it under the terms of the GNU General Public License as published by */
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
namespace Gala { public class Gala.Animation : Object {
public class Animation : Object {
public string filename { get; construct; } public string filename { get; construct; }
public string[] key_frame_files { get; private set; default = {}; } public string[] key_frame_files { get; private set; default = {}; }
public double transition_progress { get; private set; default = 0.0; } public double transition_progress { get; private set; default = 0.0; }
@ -48,11 +36,13 @@ namespace Gala {
#endif #endif
string[] key_frame_files = {}; string[] key_frame_files = {};
if (show == null) if (show == null) {
return; return;
}
if (show.get_num_slides () < 1) if (show.get_num_slides () < 1) {
return; return;
}
double progress, duration; double progress, duration;
bool is_fixed; bool is_fixed;
@ -62,13 +52,14 @@ namespace Gala {
transition_duration = duration; transition_duration = duration;
transition_progress = progress; transition_progress = progress;
if (file1 != null) if (file1 != null) {
key_frame_files += file1; key_frame_files += file1;
}
if (file2 != null) if (file2 != null) {
key_frame_files += file2; key_frame_files += file2;
}
this.key_frame_files = key_frame_files; this.key_frame_files = key_frame_files;
} }
} }
}