mirror of
https://github.com/XITRIX/NXKit.git
synced 2026-05-30 11:46:52 +00:00
Code cleanup
This commit is contained in:
@@ -24,8 +24,6 @@ add_executable(${PROJECT_NAME}
|
||||
app/Screens/TestViewController/TestViewController.cpp
|
||||
app/Screens/YogaTestViewController/YogaTestViewController.cpp
|
||||
app/Screens/IBTestController/IBTestController.cpp
|
||||
app/Screens/NXTextScreen/NXNavigationController.cpp
|
||||
app/Screens/NXTextScreen/NXTabBarController.cpp
|
||||
)
|
||||
|
||||
target_include_directories(${PROJECT_NAME} PUBLIC
|
||||
|
||||
@@ -1,12 +1,7 @@
|
||||
#include <UIApplicationDelegate.h>
|
||||
#include <UIImageView.h>
|
||||
#include <UILabel.h>
|
||||
#include <DispatchQueue.h>
|
||||
#include <NXKit.h>
|
||||
#include <Screens/TestViewController/TestViewController.hpp>
|
||||
#include <Screens/IBTestController/IBTestController.h>
|
||||
#include <Screens/YogaTestViewController/YogaTestViewController.hpp>
|
||||
#include <Screens/NXTextScreen/NXNavigationController.h>
|
||||
#include <Screens/NXTextScreen/NXTabBarController.h>
|
||||
// #include <NavigationViewController/NavigationViewController.hpp>
|
||||
// #include <TextViewController/TextViewController.hpp>
|
||||
#include <romfs/romfs.hpp>
|
||||
|
||||
@@ -2,7 +2,9 @@ project(NXKit)
|
||||
|
||||
add_library(NXKit
|
||||
lib/NXControl.cpp
|
||||
lib/NXNavigationController.cpp
|
||||
lib/NXSeparatorView.cpp
|
||||
lib/NXTabBarController.cpp
|
||||
)
|
||||
|
||||
target_include_directories(NXKit PUBLIC
|
||||
|
||||
@@ -7,4 +7,6 @@
|
||||
#include <UIKit.h>
|
||||
|
||||
#include <NXControl.h>
|
||||
#include <NXSeparatorView.h>
|
||||
#include <NXNavigationController.h>
|
||||
#include <NXSeparatorView.h>
|
||||
#include <NXTabBarController.h>
|
||||
@@ -6,6 +6,7 @@
|
||||
|
||||
#include <DispatchQueue.h>
|
||||
#include <IndexPath.h>
|
||||
#include <UIApplicationDelegate.h>
|
||||
#include <UIBlurView.h>
|
||||
#include <UIButton.h>
|
||||
#include <UIControl.h>
|
||||
|
||||
@@ -26,7 +26,7 @@ void CABlurLayer::draw(SkCanvas* context) {
|
||||
|
||||
sk_sp<SkImageFilter> newBlurFilter = SkImageFilters::Blur(_blurRadius, _blurRadius, SkTileMode::kClamp, nullptr);
|
||||
blurPaint.setImageFilter(std::move(newBlurFilter));
|
||||
//
|
||||
|
||||
context->save();
|
||||
|
||||
SkRect rect = SkRect::MakeXYWH(0, 0, bounds().width(), bounds().height());
|
||||
|
||||
@@ -110,14 +110,14 @@ void UIView::setFrame(NXRect frame) {
|
||||
setNeedsLayout();
|
||||
}
|
||||
_layer->setFrame(frame);
|
||||
// setNeedsUpdateSafeAreaInsets();
|
||||
setNeedsUpdateSafeAreaInsets();
|
||||
}
|
||||
|
||||
void UIView::setBounds(NXRect bounds) {
|
||||
if (this->bounds().size != bounds.size) {
|
||||
setNeedsDisplay();
|
||||
setNeedsLayout();
|
||||
// setNeedsUpdateSafeAreaInsets();
|
||||
setNeedsUpdateSafeAreaInsets();
|
||||
}
|
||||
_layer->setBounds(bounds);
|
||||
}
|
||||
@@ -795,7 +795,7 @@ void UIView::layoutSubviews() {
|
||||
// updateEdgeInsets();
|
||||
_yoga->layoutIfNeeded();
|
||||
// yoga->applyLayoutPreservingOrigin(true);
|
||||
// updateSafeAreaInsets();
|
||||
updateSafeAreaInsets();
|
||||
|
||||
if (!_parentController.expired()) {
|
||||
_parentController.lock()->viewDidLayoutSubviews();
|
||||
|
||||
Reference in New Issue
Block a user