GTK+ Forums Forum Index GTK+ Forums
Discussion forum for GTK+ and Programming. Ask questions, troubleshoot problems, view and post example code, or express your opinions.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Why is my app so ugly?

 
Post new topic   Reply to topic    GTK+ Forums Forum Index -> GTK+ Programming
Author Message
godmodder



Joined: 18 Apr 2008
Posts: 3

PostPosted: Fri Apr 18, 2008 6:09 pm    Post subject: Why is my app so ugly? Reply with quote

Hello,

I'm using glade 3.2.0 together with GTK 2.10.11 on Ubuntu and my applications look like they use a very old theme or something. The buttons and everything look really ugly and dated.

Does anyone have an idea of what the problem could be?

Thanks in advance,
Jeroen
Back to top
openldev
Never Seen the Sunlight


Joined: 21 Sep 2005
Posts: 372
Location: State College, Pennsylvania

PostPosted: Fri Apr 18, 2008 8:02 pm    Post subject: Reply with quote

What theme are you using? Do your applications look like other GTK+ applications? Are you sure that you are compiling against GTK+ 2.x? Could we see some code and/or a screenshot?
Back to top
godmodder



Joined: 18 Apr 2008
Posts: 3

PostPosted: Fri Apr 18, 2008 8:18 pm    Post subject: Reply with quote

Here's a screenshot.



For clarification I'll post the code here too:

sarcasm.c:
Code: (C)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31

#include "sarcasm.h"

void InitApp()
{
    GladeXML *Xml;

    Xml = glade_xml_new("MainWindow.glade", NULL, NULL);

    glade_xml_signal_autoconnect(Xml);

    SetCallBacks(Xml);

    //g_object_unref(G_OBJECT(Xml));
}

void SetCallBacks(GladeXML *Xml)
{
    GtkWidget *ActieNieuw = glade_xml_get_widget(Xml, "ActieNieuw");
    glade_xml_signal_connect_data(Xml, "on_ActieNieuw_activate", G_CALLBACK(Reset), (gpointer)Xml);
}

void Reset(GtkWidget *Widget, gpointer Data)
{
    GladeXML *Xml = (GladeXML*)Data;
    GtkWidget *CodeWidget = glade_xml_get_widget(Xml, "CodeWidget");
    GtkTextBuffer *Buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(CodeWidget));

    gtk_text_buffer_set_text(Buffer, "Lekker Leeg...", -1);
}


sarcasm.h:
Code: (C)
1
2
3
4
5
6
7
8
9
10
11
12
13

#ifndef _SARCASM_H
#define _SARCASM_H

#include <gtk/gtk.h>
#include <glade/glade.h>

void InitApp();
void SetCallBacks();
void Reset();

#endif


main.c:
Code: (C)
1
2
3
4
5
6
7
8
9
10
11
12
13
14

#include "sarcasm.h"

int main(int Argc, char *Argv[])
{
    gtk_init(&Argc, &Argv);

    InitApp();

    gtk_main();

    return 0;
}


I'm using the default Ubuntu "Human" theme and I'm linking with GTK the usual `pkg-config` way.

Jeroen
Back to top
Micah Carrick
Never Seen the Sunlight


Joined: 21 Sep 2005
Posts: 407
Location: Portland, OR USA

PostPosted: Sat Apr 19, 2008 8:53 pm    Post subject: Reply with quote

Are you running your application as root perhaps? The root user has a different GTK theme I believe...
Back to top
godmodder



Joined: 18 Apr 2008
Posts: 3

PostPosted: Sun Apr 20, 2008 10:59 am    Post subject: Reply with quote

It seems I get the opposite effect: when I run the app as root all is fine, but when I run it under my account it uses the old theme.

How can I prevent this?

Jeroen
Back to top
RamDas
Familiar Face


Joined: 07 Apr 2008
Posts: 7

PostPosted: Wed Apr 23, 2008 9:32 pm    Post subject: themes Reply with quote

If your themes are look perfect in root as Micah suggested, perhaps your user profile corrupted. Create another user and try to run the program logon as the new user. When you create a new user the system will copy a fresh copy of profile in to the home directory upon login.

But, What I can see from your screenshot is, everything else is fine except your program not utilizing the theme. :) That doesn't make sense. Any way give a try by creating another user.

Ram Das
Back to top
Display posts from previous:   
Post new topic   Reply to topic    GTK+ Forums Forum Index -> GTK+ Programming All times are GMT
Page 1 of 1

 


Powered by phpBB © 2001, 2005 phpBB Group
CodeBB 1.0 Beta 2
Protected by Anti-Spam ACP