build: update to zig 0.14.0-dev.3039
This commit is contained in:
		
							parent
							
								
									1764b3259c
								
							
						
					
					
						commit
						53045123c6
					
				
					 41 changed files with 648 additions and 623 deletions
				
			
		| 
						 | 
				
			
			@ -6,7 +6,7 @@ const EventHandler = @import("EventHandler");
 | 
			
		|||
const Widget = @import("../Widget.zig");
 | 
			
		||||
 | 
			
		||||
plane: Plane,
 | 
			
		||||
layout: Widget.Layout,
 | 
			
		||||
layout_: Widget.Layout,
 | 
			
		||||
on_event: ?EventHandler,
 | 
			
		||||
 | 
			
		||||
const Self = @This();
 | 
			
		||||
| 
						 | 
				
			
			@ -17,7 +17,7 @@ pub fn Create(comptime layout_: Widget.Layout) @import("widget.zig").CreateFunct
 | 
			
		|||
            const self: *Self = try allocator.create(Self);
 | 
			
		||||
            self.* = .{
 | 
			
		||||
                .plane = try Plane.init(&(Widget.Box{}).opts(@typeName(Self)), parent),
 | 
			
		||||
                .layout = layout_,
 | 
			
		||||
                .layout_ = layout_,
 | 
			
		||||
                .on_event = event_handler,
 | 
			
		||||
            };
 | 
			
		||||
            return Widget.to(self);
 | 
			
		||||
| 
						 | 
				
			
			@ -31,7 +31,7 @@ pub fn deinit(self: *Self, allocator: std.mem.Allocator) void {
 | 
			
		|||
}
 | 
			
		||||
 | 
			
		||||
pub fn layout(self: *Self) Widget.Layout {
 | 
			
		||||
    return self.layout;
 | 
			
		||||
    return self.layout_;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
pub fn render(self: *Self, theme: *const Widget.Theme) bool {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -7,6 +7,7 @@ const root = @import("root");
 | 
			
		|||
 | 
			
		||||
const Plane = @import("renderer").Plane;
 | 
			
		||||
const style = @import("renderer").style;
 | 
			
		||||
const styles = @import("renderer").styles;
 | 
			
		||||
const command = @import("command");
 | 
			
		||||
const EventHandler = @import("EventHandler");
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -101,7 +102,7 @@ pub fn render(self: *Self, btn: *Button.State(Self), theme: *const Widget.Theme)
 | 
			
		|||
}
 | 
			
		||||
 | 
			
		||||
fn render_mini_mode(plane: *Plane, theme: *const Widget.Theme) void {
 | 
			
		||||
    plane.off_styles(style.italic);
 | 
			
		||||
    plane.off_styles(styles.italic);
 | 
			
		||||
    const mini_mode = tui.mini_mode() orelse return;
 | 
			
		||||
    _ = plane.print(" {s}", .{mini_mode.text}) catch {};
 | 
			
		||||
    if (mini_mode.cursor) |cursor| {
 | 
			
		||||
| 
						 | 
				
			
			@ -129,7 +130,7 @@ fn render_mini_mode(plane: *Plane, theme: *const Widget.Theme) void {
 | 
			
		|||
//  Content save cog
 | 
			
		||||
//  Content save all
 | 
			
		||||
fn render_normal(self: *Self, plane: *Plane, theme: *const Widget.Theme) void {
 | 
			
		||||
    plane.on_styles(style.italic);
 | 
			
		||||
    plane.on_styles(styles.italic);
 | 
			
		||||
    _ = plane.putstr(" ") catch {};
 | 
			
		||||
    if (self.file_icon.len > 0) {
 | 
			
		||||
        self.render_file_icon(plane, theme);
 | 
			
		||||
| 
						 | 
				
			
			@ -141,7 +142,7 @@ fn render_normal(self: *Self, plane: *Plane, theme: *const Widget.Theme) void {
 | 
			
		|||
}
 | 
			
		||||
 | 
			
		||||
fn render_detailed(self: *Self, plane: *Plane, theme: *const Widget.Theme) void {
 | 
			
		||||
    plane.on_styles(style.italic);
 | 
			
		||||
    plane.on_styles(styles.italic);
 | 
			
		||||
    _ = plane.putstr(" ") catch {};
 | 
			
		||||
    if (self.file_icon.len > 0) {
 | 
			
		||||
        self.render_file_icon(plane, theme);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -3,6 +3,7 @@ const Allocator = std.mem.Allocator;
 | 
			
		|||
 | 
			
		||||
const Plane = @import("renderer").Plane;
 | 
			
		||||
const style = @import("renderer").style;
 | 
			
		||||
const styles = @import("renderer").styles;
 | 
			
		||||
const command = @import("command");
 | 
			
		||||
const EventHandler = @import("EventHandler");
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -52,7 +53,7 @@ pub fn render(_: *void, self: *Button.State(void), theme: *const Widget.Theme) b
 | 
			
		|||
    self.plane.set_style(style_label);
 | 
			
		||||
    self.plane.fill(" ");
 | 
			
		||||
    self.plane.home();
 | 
			
		||||
    self.plane.on_styles(style.bold);
 | 
			
		||||
    self.plane.on_styles(styles.bold);
 | 
			
		||||
    var buf: [31:0]u8 = undefined;
 | 
			
		||||
    if (!is_mini_mode() and !is_overlay_mode()) {
 | 
			
		||||
        render_logo(self, theme, style_label);
 | 
			
		||||
| 
						 | 
				
			
			@ -60,7 +61,7 @@ pub fn render(_: *void, self: *Button.State(void), theme: *const Widget.Theme) b
 | 
			
		|||
        _ = self.plane.putstr("  ") catch {};
 | 
			
		||||
    }
 | 
			
		||||
    self.plane.set_style(style_label);
 | 
			
		||||
    self.plane.on_styles(style.bold);
 | 
			
		||||
    self.plane.on_styles(styles.bold);
 | 
			
		||||
    _ = self.plane.putstr(std.fmt.bufPrintZ(&buf, "{s} ", .{tui.get_mode()}) catch return false) catch {};
 | 
			
		||||
    if (is_mini_mode())
 | 
			
		||||
        render_separator(self, theme);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -425,7 +425,7 @@ const Tab = struct {
 | 
			
		|||
 | 
			
		||||
const spacer = struct {
 | 
			
		||||
    plane: Plane,
 | 
			
		||||
    layout: Widget.Layout,
 | 
			
		||||
    layout_: Widget.Layout,
 | 
			
		||||
    on_event: ?EventHandler,
 | 
			
		||||
    content: []const u8,
 | 
			
		||||
    fg: colors,
 | 
			
		||||
| 
						 | 
				
			
			@ -444,7 +444,7 @@ const spacer = struct {
 | 
			
		|||
        const self: *Self = try allocator.create(Self);
 | 
			
		||||
        self.* = .{
 | 
			
		||||
            .plane = try Plane.init(&(Widget.Box{}).opts(@typeName(Self)), parent),
 | 
			
		||||
            .layout = .{ .static = self.plane.egc_chunk_width(content, 0, 1) },
 | 
			
		||||
            .layout_ = .{ .static = self.plane.egc_chunk_width(content, 0, 1) },
 | 
			
		||||
            .on_event = event_handler,
 | 
			
		||||
            .content = content,
 | 
			
		||||
            .fg = fg,
 | 
			
		||||
| 
						 | 
				
			
			@ -459,7 +459,7 @@ const spacer = struct {
 | 
			
		|||
    }
 | 
			
		||||
 | 
			
		||||
    pub fn layout(self: *Self) Widget.Layout {
 | 
			
		||||
        return self.layout;
 | 
			
		||||
        return self.layout_;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    pub fn render(self: *Self, theme: *const Widget.Theme) bool {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue