mirror of
https://github.com/aseprite/aseprite.git
synced 2025-03-14 04:19:12 +00:00
Move AnimatedWidget from app to ui
This commit is contained in:
parent
78353199bb
commit
c1d5f8eb0a
@ -10,10 +10,10 @@
|
||||
#pragma once
|
||||
|
||||
#include "app/file_system.h"
|
||||
#include "app/ui/animated_widget.h"
|
||||
#include "base/paths.h"
|
||||
#include "base/time.h"
|
||||
#include "obs/signal.h"
|
||||
#include "ui/animated_widget.h"
|
||||
#include "ui/timer.h"
|
||||
#include "ui/widget.h"
|
||||
|
||||
@ -28,7 +28,7 @@ namespace os {
|
||||
namespace app {
|
||||
|
||||
class FileList : public ui::Widget
|
||||
, private AnimatedWidget {
|
||||
, private ui::AnimatedWidget {
|
||||
public:
|
||||
FileList();
|
||||
virtual ~FileList();
|
||||
|
@ -9,7 +9,7 @@
|
||||
#define APP_UI_TABS_H_INCLUDED
|
||||
#pragma once
|
||||
|
||||
#include "app/ui/animated_widget.h"
|
||||
#include "ui/animated_widget.h"
|
||||
#include "ui/mouse_buttons.h"
|
||||
#include "ui/timer.h"
|
||||
#include "ui/widget.h"
|
||||
@ -111,7 +111,7 @@ namespace app {
|
||||
|
||||
// Tabs control. Used to show opened documents.
|
||||
class Tabs : public ui::Widget
|
||||
, public AnimatedWidget {
|
||||
, public ui::AnimatedWidget {
|
||||
struct Tab {
|
||||
TabView* view;
|
||||
std::string text;
|
||||
|
@ -8,8 +8,8 @@
|
||||
#define APP_UI_WORKSPACE_PANEL_H_INCLUDED
|
||||
#pragma once
|
||||
|
||||
#include "app/ui/animated_widget.h"
|
||||
#include "app/ui/workspace_views.h"
|
||||
#include "ui/animated_widget.h"
|
||||
#include "ui/widget.h"
|
||||
|
||||
#include <map>
|
||||
@ -26,7 +26,7 @@ namespace app {
|
||||
};
|
||||
|
||||
class WorkspacePanel : public ui::Widget
|
||||
, public AnimatedWidget {
|
||||
, public ui::AnimatedWidget {
|
||||
enum Ani : int {
|
||||
ANI_NONE,
|
||||
ANI_DROPAREA,
|
||||
|
@ -1,11 +1,12 @@
|
||||
// Aseprite
|
||||
// Aseprite UI Library
|
||||
// Copyright (C) 2019 Igara Studio S.A.
|
||||
// Copyright (C) 2001-2016 David Capello
|
||||
//
|
||||
// This program is distributed under the terms of
|
||||
// the End-User License Agreement for Aseprite.
|
||||
// This file is released under the terms of the MIT license.
|
||||
// Read LICENSE.txt for more information.
|
||||
|
||||
#ifndef APP_UI_ANIMATED_WIDGET_H_INCLUDED
|
||||
#define APP_UI_ANIMATED_WIDGET_H_INCLUDED
|
||||
#ifndef UI_ANIMATED_WIDGET_H_INCLUDED
|
||||
#define UI_ANIMATED_WIDGET_H_INCLUDED
|
||||
#pragma once
|
||||
|
||||
#include "obs/connection.h"
|
||||
@ -13,14 +14,13 @@
|
||||
|
||||
#include <cmath>
|
||||
|
||||
namespace app {
|
||||
namespace ui {
|
||||
|
||||
class AnimatedWidget {
|
||||
public:
|
||||
AnimatedWidget()
|
||||
: m_timer(1000/60)
|
||||
, m_animation(0)
|
||||
{
|
||||
, m_animation(0) {
|
||||
m_scopedConn = m_timer.Tick.connect(&AnimatedWidget::onTick, this);
|
||||
}
|
||||
|
||||
@ -90,6 +90,6 @@ namespace app {
|
||||
obs::scoped_connection m_scopedConn;
|
||||
};
|
||||
|
||||
} // namespace app
|
||||
} // namespace ui
|
||||
|
||||
#endif
|
Loading…
x
Reference in New Issue
Block a user